diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..240d53a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: php +sudo: false + +php: + - 5.5 + - 5.6 + - 7.0 + - 7.1 + - hhvm + +env: + - MAGENTO_VERSION="magento-mirror-1.9.3.4" + +matrix: + fast_finish: true + allow_failures: + - php: 7.0 + - php: 7.1 + - php: hhvm + +script: + - curl -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash diff --git a/FireGento_Pdf.xml b/FireGento_Pdf.xml index 03d2422..104add9 100755 --- a/FireGento_Pdf.xml +++ b/FireGento_Pdf.xml @@ -9,7 +9,7 @@ FireGento PDF overwrites standard PDF layouts for invoices, shipments and creditmemos. Anyway, you can still use the standard Magento layout, because the extension is highly configurable. GPL-3.0 - 1.3.0 + 1.4.0 stable - [FEATURE] support for downloading invoice/creditmemo/shipping PDFs from the customer account page - [FEATURE] support for downloadable items diff --git a/README.md b/README.md index 8142083..0cf9488 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ FireGento PDF ============= +[![Build Status](https://travis-ci.org/firegento/firegento-pdf.svg?branch=development)](https://travis-ci.org/firegento/firegento-pdf/) + FireGento PDF overwrites standard PDF layouts for invoices, shipments and creditmemos. Facts ----- -- version: 1.3.0 +- version: 1.4.0 - extension key: FireGento_Pdf -- [extension on Magento Connect](http://www.magentocommerce.com/magento-connect/firegento-pdf.html) -- Magento Connect 2.0 extension key: http://connect20.magentocommerce.com/community/FireGento_Pdf - [extension on GitHub](https://github.com/firegento/firegento-pdf) - [direct download link](https://github.com/firegento/firegento-pdf/archive/master.zip) @@ -17,7 +17,7 @@ FireGento PDF overwrites standard PDF layouts for invoices, shipments and credit Requirements ------------ -- PHP >= 5.2.0 +- PHP >= 5.6.0 - Mage_Core - Mage_Pdf - Mage_Sales @@ -28,11 +28,11 @@ Compatibility Installation Instructions ------------------------- -1. Install the extension via Magento Connect with the key shown above or copy all the files into your document root. +1. Copy all the files into your document root. 2. Clear the cache, logout from the admin panel and then login again. 3. Configure the extension under System - Configuration - Sales - PDF Print-outs. -###Recommendation +### Recommendation If you use this extension for an austrian shop or Austrian locale (de_AT), please make sure to install [Hackathon_LocaleFallback](https://github.com/magento-hackathon/Hackathon_LocaleFallback) as well, because we only maintain the strings which differ between German locales, so you need this plugin (or have to copy all the strings over). Uninstallation @@ -57,4 +57,4 @@ License Copyright --------- -(c) 2013-2014 FireGento Team +(c) 2013-2018 FireGento Team diff --git a/composer.json b/composer.json index 7fe37e0..7ad6010 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,16 @@ { - "name": "firegento/pdf", - "license": ["GPL-3.0"], - "type": "magento-module", - "description": "FireGento Pdf overwrites standard PDF layouts for invoices and shipments.", - "homepage": "https://github.com/firegento/firegento-pdf", - "suggest": { - "magento-hackathon/localefallback": "Allows fallback for locales, especially german, swiss/austria", - "magento-hackathon/magento-composer-installer": "Magento composer installer (or a replacement) is needed to install this packages" - }, - "require-dev": { - "ivanchepurnyi/ecomdev_phpunit": "dev-dev" - } + "name": "firegento/pdf", + "license": [ + "GPL-3.0-only" + ], + "type": "magento-module", + "description": "FireGento Pdf overwrites standard PDF layouts for invoices and shipments.", + "homepage": "https://github.com/firegento/firegento-pdf", + "suggest": { + "magento-hackathon/localefallback": "Allows fallback for locales, especially german, swiss/austria", + "magento-hackathon/magento-composer-installer": "Magento composer installer (or a replacement) is needed to install this packages" + }, + "require-dev": { + "ivanchepurnyi/ecomdev_phpunit": "dev-dev" + } } diff --git a/configuration.png b/configuration.png new file mode 100644 index 0000000..2c0157a Binary files /dev/null and b/configuration.png differ diff --git a/docs/api/html/classes.xhtml b/docs/api/html/classes.xhtml index ebdb97b..f4ceb7b 100644 --- a/docs/api/html/classes.xhtml +++ b/docs/api/html/classes.xhtml @@ -38,251 +38,374 @@ + + + FireGento_Pdf_Adminhtml_Sales_CreditmemoController + + + No description available + + EMPTY + + + + + FireGento_Pdf_Adminhtml_Sales_InvoiceController + + + No description available + + EMPTY + + + + + FireGento_Pdf_Adminhtml_Sales_OrderController + + + No description available + + EMPTY + + FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController Class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController - UNTESTED + EMPTY + FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController Class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController - UNTESTED + EMPTY + FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController Class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController - UNTESTED + EMPTY + + + + + FireGento_Pdf_Adminhtml_Sales_ShipmentController + + + No description available + + EMPTY + + + + + FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes + + + No description available + + EMPTY + + + + + FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + + HTML select element block with country options + EMPTY + FireGento_Pdf_Helper_Data Dummy data helper for translation issues. - UNTESTED + EMPTY + + + + + FireGento_Pdf_Helper_Invoice + + Helper for invoice creation. + EMPTY + FireGento_Pdf_Model_Creditmemo Creditmemo model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Engine_Abstract Abstract pdf model. - UNTESTED + EMPTY + FireGento_Pdf_Model_Engine_Creditmemo_Default Creditmemo model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Engine_Invoice_Default Default invoice rendering engine. - UNTESTED + EMPTY + FireGento_Pdf_Model_Engine_Shipment_Default Shipment model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Invoice Invoice model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Bundle Bundle item model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Default Default item model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Downloadable Class FireGento_Pdf_Model_Items_Downloadable - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Grouped Default item model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Shipment_Bundle Shipment bundle item model. - UNTESTED + EMPTY + FireGento_Pdf_Model_Items_Shipment_Default Shipment default item model. - UNTESTED + EMPTY + + + + + FireGento_Pdf_Model_Items_Unirgy_Default + + Default item model rewrite. + EMPTY + + + + + FireGento_Pdf_Model_Items_Unirgy_Shipment_Default + + Default item model rewrite. + EMPTY + FireGento_Pdf_Model_Observer FireGento Pdf observer. - UNTESTED + EMPTY + FireGento_Pdf_Model_Shipment Shipment model rewrite. - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Backend_Font Class FireGento_Pdf_Model_System_Config_Backend_Font - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine Pdf creation engine source model. - UNTESTED + EMPTY + + + + + FireGento_Pdf_Model_System_Config_Source_Customer_Number + + Customer number source model. + EMPTY + FireGento_Pdf_Model_System_Config_Source_Headerblocks Logo position source model. - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Source_Invoice_Engine Pdf creation engine source model. - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Source_Logo Logo position source model. - UNTESTED + EMPTY + + + + + FireGento_Pdf_Model_System_Config_Source_PageSize + + Page size source model. + EMPTY + FireGento_Pdf_Model_System_Config_Source_Payment Payment method position source model. - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Source_Shipment_Engine Pdf creation engine source model. - UNTESTED + EMPTY + FireGento_Pdf_Model_System_Config_Source_Shipping Shipping method position source model. - UNTESTED + EMPTY + FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal Shipment bundle item model. - UNTESTED + EMPTY + FireGento_Pdf_Sales_OrderController Sales orders controller - UNTESTED + EMPTY + FireGento_Pdf_Test_Model_CreditmemoTest - - No description available - - UNTESTED + Test class for creditmemos. + EMPTY + FireGento_Pdf_Test_Model_InvoiceTest - - No description available - - UNTESTED + Test class for invoices. + EMPTY + FireGento_Pdf_Test_Model_SalesObjectTestAbstract - - No description available - - UNTESTED + Abstract test class for the different engines. + EMPTY + FireGento_Pdf_Test_Model_ShipmentTest - - No description available - - UNTESTED + Test class for shipments. + EMPTY + Firegento_Pdf_Block_Adminhtml_ColumnOrder - Firegento - UNTESTED + Block which enables the user to change the column order in the admin via drag & drop. + EMPTY +
- + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xhtml new file mode 100644 index 0000000..e47eab2 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xhtml @@ -0,0 +1,93 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_CreditmemoController + + + + + +
+
+ +
+ +
+

\FireGento_Pdf_Adminhtml_Sales_CreditmemoController

+

+

+

Synopsis

+
class FireGento_Pdf_Adminhtml_Sales_CreditmemoController + extends Mage_Adminhtml_Sales_CreditmemoController + {
+ + }
+

Hierarchy

+
+

Extends

+
    +
  • Mage_Adminhtml_Sales_CreditmemoController
  • +
+
+

Methods

+
+

public

+ +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController/pdfcreditmemosAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController/pdfcreditmemosAction.xhtml new file mode 100644 index 0000000..4959f98 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController/pdfcreditmemosAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_CreditmemoController::pdfcreditmemosAction + + + + + +
+ + +
+

FireGento_Pdf_Adminhtml_Sales_CreditmemoController::pdfcreditmemosAction

+

+

+

Signature

+
+ public function pdfcreditmemosAction() + +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xhtml new file mode 100644 index 0000000..ccd75d7 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xhtml @@ -0,0 +1,93 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_InvoiceController + + + + + +
+
+ +
+ +
+

\FireGento_Pdf_Adminhtml_Sales_InvoiceController

+

+

+

Synopsis

+
class FireGento_Pdf_Adminhtml_Sales_InvoiceController + extends Mage_Adminhtml_Sales_InvoiceController + {
+ + }
+

Hierarchy

+
+

Extends

+
    +
  • Mage_Adminhtml_Sales_InvoiceController
  • +
+
+

Methods

+
+

public

+ +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController/pdfinvoicesAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController/pdfinvoicesAction.xhtml new file mode 100644 index 0000000..59c2196 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController/pdfinvoicesAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_InvoiceController::pdfinvoicesAction + + + + + +
+ + +
+

FireGento_Pdf_Adminhtml_Sales_InvoiceController::pdfinvoicesAction

+

+

+

Signature

+
+ public function pdfinvoicesAction() + +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xhtml new file mode 100644 index 0000000..a353dea --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xhtml @@ -0,0 +1,101 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_OrderController + + + + + +
+
+ +
+ +
+

\FireGento_Pdf_Adminhtml_Sales_OrderController

+

+

+

Synopsis

+
class FireGento_Pdf_Adminhtml_Sales_OrderController + extends Mage_Adminhtml_Sales_OrderController + {
+ + }
+

Hierarchy

+
+

Extends

+
    +
  • Mage_Adminhtml_Sales_OrderController
  • +
+
+

Methods

+ +
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfcreditmemosAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfcreditmemosAction.xhtml new file mode 100644 index 0000000..6a4dc5d --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfcreditmemosAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_OrderController::pdfcreditmemosAction + + + + + +
+
+ +
+ +
+

FireGento_Pdf_Adminhtml_Sales_OrderController::pdfcreditmemosAction

+

+

+

Signature

+
+ public function pdfcreditmemosAction() + +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfinvoicesAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfinvoicesAction.xhtml new file mode 100644 index 0000000..56e2072 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfinvoicesAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_OrderController::pdfinvoicesAction + + + + + +
+ + +
+

FireGento_Pdf_Adminhtml_Sales_OrderController::pdfinvoicesAction

+

+

+

Signature

+
+ public function pdfinvoicesAction() + +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfshipmentsAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfshipmentsAction.xhtml new file mode 100644 index 0000000..735e7c3 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_OrderController/pdfshipmentsAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_OrderController::pdfshipmentsAction + + + + + +
+
+ +
+ +
+

FireGento_Pdf_Adminhtml_Sales_OrderController::pdfshipmentsAction

+

+

+

Signature

+
+ public function pdfshipmentsAction() + +
+
+
+
+ Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
+ + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xhtml index 328dd73..28b1d48 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -66,7 +66,7 @@

    Synopsis

    class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController - extends Mage_Adminhtml_Sales_Order_CreditmemoController + extends Mage_Adminhtml_Sales_Order_CreditmemoController {
    @@ -75,9 +75,7 @@

    Extends

    Methods

    @@ -91,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController/printAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController/printAction.xhtml index 9c1f83f..6e665ed 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController/printAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController/printAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController::printAction @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xhtml index 52cedcc..6558d33 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xhtml @@ -66,7 +66,7 @@

    Synopsis

    class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController - extends Mage_Adminhtml_Sales_Order_InvoiceController + extends Mage_Adminhtml_Sales_Order_InvoiceController {
    @@ -75,9 +75,7 @@

    Extends

    Methods

    @@ -91,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController/printAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController/printAction.xhtml index e496d0c..7d6a3d7 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController/printAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController/printAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController::printAction @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xhtml index 4c49323..58f22d6 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xhtml @@ -66,7 +66,7 @@

    Synopsis

    class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController - extends Mage_Adminhtml_Sales_Order_ShipmentController + extends Mage_Adminhtml_Sales_Order_ShipmentController {
    @@ -75,9 +75,7 @@

    Extends

    Methods

    @@ -91,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController/printAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController/printAction.xhtml index 7e60b8f..1d8127d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController/printAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController/printAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController::printAction @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xhtml new file mode 100644 index 0000000..133f89f --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xhtml @@ -0,0 +1,93 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_ShipmentController + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Adminhtml_Sales_ShipmentController

    +

    +

    +

    Synopsis

    +
    class FireGento_Pdf_Adminhtml_Sales_ShipmentController + extends Mage_Adminhtml_Sales_ShipmentController + {
    + + }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Adminhtml_Sales_ShipmentController
    • +
    +
    +

    Methods

    +
    +

    public

    + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController/pdfshipmentsAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController/pdfshipmentsAction.xhtml new file mode 100644 index 0000000..6caa062 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController/pdfshipmentsAction.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Adminhtml_Sales_ShipmentController::pdfshipmentsAction + + + + + +
    + + +
    +

    FireGento_Pdf_Adminhtml_Sales_ShipmentController::pdfshipmentsAction

    +

    +

    +

    Signature

    +
    + public function pdfshipmentsAction() + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xhtml new file mode 100644 index 0000000..fbe9ce8 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xhtml @@ -0,0 +1,111 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes

    +

    +

    +

    Synopsis

    +
    class FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes + extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract + {
    • // members
    • protected FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country $_countryRenderer; +
    + + }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
    • +
    +
    +

    Members

    +
    +

    protected

    + +
    +

    Methods

    +
    +

    protected

    + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_getCountryRenderer.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_getCountryRenderer.xhtml new file mode 100644 index 0000000..ea47e3a --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_getCountryRenderer.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_getCountryRenderer + + + + + +
    + + +
    +

    FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_getCountryRenderer

    +

    Retrieve country column renderer

    +

    +

      +

      Signature

      +
      + protected function _getCountryRenderer() + +
      +

      Returns

      +
      +
      FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareArrayRow.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareArrayRow.xhtml new file mode 100644 index 0000000..1521fbf --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareArrayRow.xhtml @@ -0,0 +1,87 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_prepareArrayRow + + + + + +
    + + +
    +

    FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_prepareArrayRow

    +

    Prepare existing row data object

    +

    +

      +

      Signature

      +
      + protected function _prepareArrayRow(Varien_Object + $row ) + +
      +

      Parameters

      +
      +
      $row + — +
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareToRender.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareToRender.xhtml new file mode 100644 index 0000000..718f1d4 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes/_prepareToRender.xhtml @@ -0,0 +1,76 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_prepareToRender + + + + +
    +
    + + +
    +

    FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes::_prepareToRender

    +

    Add columns, change button labels etc.

    +

    +

      +

      Signature

      +
      + protected function _prepareToRender() + +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xhtml new file mode 100644 index 0000000..ef15793 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xhtml @@ -0,0 +1,97 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country

    +

    HTML select element block with country options

    +

    +

      +

      Synopsis

      +
      class FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + extends Mage_Core_Block_Html_Select + {
      + + }
      +

      Hierarchy

      +
      +

      Extends

      +
        +
      • Mage_Core_Block_Html_Select
      • +
      +
      +

      Methods

      +
      +

      public

      + +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/_toHtml.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/_toHtml.xhtml new file mode 100644 index 0000000..168007f --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/_toHtml.xhtml @@ -0,0 +1,84 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country::_toHtml + + + + + +
    + + +
    +

    FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country::_toHtml

    +

    Render block HTML

    +

    +

      +

      Signature

      +
      + public function _toHtml() + +
      +

      Returns

      +
      +
      string
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/setInputName.xhtml b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/setInputName.xhtml new file mode 100644 index 0000000..90607b5 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country/setInputName.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country::setInputName + + + + + +
    + + +
    +

    FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country::setInputName

    +

    +

    +

      +

      Signature

      +
      + public function setInputName( + $value ) + +
      +

      Parameters

      +
      +
      $value + — +
      +
      +
      +

      Returns

      +
      +
      mixed
      +
      +
      +

    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data.xhtml index dd65ea1..6b94304 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data.xhtml @@ -56,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -66,20 +66,28 @@

    Synopsis

    class FireGento_Pdf_Helper_Data - extends Mage_Core_Helper_Abstract - {
    • // constants
    • const XML_PATH_FIREGENTO_PDF_LOGO_POSITION = 'sales_pdf/firegento_pdf/logo_position';
    • const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER = 'sales_pdf/invoice/show_customer_number';
    • const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER = 'sales_pdf/shipment/show_customer_number';
    • const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/show_customer_number';
    • const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN = 'sales_pdf/invoice/filename_export_pattern';
    • const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN = 'sales_pdf/shipment/filename_export_pattern';
    • const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN = 'sales_pdf/creditmemo/filename_export_pattern';
    • const XML_PATH_REGULAR_FONT = 'sales_pdf/firegento_pdf_fonts/regular_font';
    • const XML_PATH_BOLD_FONT = 'sales_pdf/firegento_pdf_fonts/bold_font';
    • const XML_PATH_ITALIC_FONT = 'sales_pdf/firegento_pdf_fonts/italic_font';
    • const FONT_PATH_IN_MEDIA = '/firegento_pdf/fonts';
    • // methods
    • public mixed putOrderId() + extends Mage_Core_Helper_Abstract + {
      • // constants
      • const XML_PATH_FIREGENTO_PDF_LOGO_POSITION = 'sales_pdf/firegento_pdf/logo_position';
      • const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER = 'sales_pdf/invoice/show_customer_number';
      • const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER = 'sales_pdf/shipment/show_customer_number';
      • const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/show_customer_number';
      • const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/invoice/show_customer_vatnumber';
      • const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/shipment/show_customer_vatnumber';
      • const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/creditmemo/show_customer_vatnumber';
      • const XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/invoice/guestorder_customer_number';
      • const XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/shipment/guestorder_customer_number';
      • const XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/guestorder_customer_number';
      • const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN = 'sales_pdf/invoice/filename_export_pattern';
      • const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN = 'sales_pdf/shipment/filename_export_pattern';
      • const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN = 'sales_pdf/creditmemo/filename_export_pattern';
      • const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/invoice/filename_export_pattern_for_multiple_documents';
      • const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/shipment/filename_export_pattern_for_multiple_documents';
      • const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/creditmemo/filename_export_pattern_for_multiple_documents';
      • const XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE = 'sales_pdf/firegento_pdf/page_size';
      • const XML_PATH_COLOR_TEXT = 'sales_pdf/firegento_pdf_colors/text';
      • const XML_PATH_COLOR_LABELS = 'sales_pdf/firegento_pdf_colors/labels';
      • const XML_PATH_COLOR_TABLE_HEADER = 'sales_pdf/firegento_pdf_colors/table_header';
      • const XML_PATH_COLOR_FOOTER = 'sales_pdf/firegento_pdf_colors/footer';
      • const XML_PATH_REGULAR_FONT = 'sales_pdf/firegento_pdf_fonts/regular_font';
      • const XML_PATH_BOLD_FONT = 'sales_pdf/firegento_pdf_fonts/bold_font';
      • const XML_PATH_ITALIC_FONT = 'sales_pdf/firegento_pdf_fonts/italic_font';
      • const FONT_PATH_IN_MEDIA = '/firegento_pdf/fonts';
      }
    @@ -87,9 +95,7 @@

    Extends

    Constants

    @@ -117,6 +123,30 @@ XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER 'sales_pdf/creditmemo/show_customer_number' + + XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER + 'sales_pdf/invoice/show_customer_vatnumber' + + + XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER + 'sales_pdf/shipment/show_customer_vatnumber' + + + XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER + 'sales_pdf/creditmemo/show_customer_vatnumber' + + + XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER + 'sales_pdf/invoice/guestorder_customer_number' + + + XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER + 'sales_pdf/shipment/guestorder_customer_number' + + + XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER + 'sales_pdf/creditmemo/guestorder_customer_number' + XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN 'sales_pdf/invoice/filename_export_pattern' @@ -129,6 +159,38 @@ XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN 'sales_pdf/creditmemo/filename_export_pattern' + + XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + 'sales_pdf/invoice/filename_export_pattern_for_multiple_documents' + + + XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + 'sales_pdf/shipment/filename_export_pattern_for_multiple_documents' + + + XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + 'sales_pdf/creditmemo/filename_export_pattern_for_multiple_documents' + + + XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE + 'sales_pdf/firegento_pdf/page_size' + + + XML_PATH_COLOR_TEXT + 'sales_pdf/firegento_pdf_colors/text' + + + XML_PATH_COLOR_LABELS + 'sales_pdf/firegento_pdf_colors/labels' + + + XML_PATH_COLOR_TABLE_HEADER + 'sales_pdf/firegento_pdf_colors/table_header' + + + XML_PATH_COLOR_FOOTER + 'sales_pdf/firegento_pdf_colors/footer' + XML_PATH_REGULAR_FONT 'sales_pdf/firegento_pdf_fonts/regular_font' @@ -149,30 +211,54 @@

    Methods

    +

    protected

    +

    public

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getColor.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getColor.xhtml new file mode 100644 index 0000000..102bef3 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getColor.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getColor + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getColor

    +

    Get configured PDF color

    +

    +

      +

      Signature

      +
      + protected function getColor(string + $path ) + +
      +

      Parameters

      +
      +
      $path + — + string
      +
      System config path
      +
      +

      Returns

      +
      +
      Zend_Pdf_Color_Html
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilename.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilename.xhtml index 13df7e1..82a094b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilename.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilename.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::getExportFilename @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -95,7 +95,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilenameForMultipleDocuments.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilenameForMultipleDocuments.xhtml new file mode 100644 index 0000000..8f96ef9 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportFilenameForMultipleDocuments.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getExportFilenameForMultipleDocuments + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getExportFilenameForMultipleDocuments

    +

    The filename of the exported file if multiple documents are printed at once.

    +

    +

      +

      Signature

      +
      + public function getExportFilenameForMultipleDocuments(string + $type ) + +
      +

      Parameters

      +
      +
      $type + — + string
      +
      the type of this document like invoice, shipment or creditmemo
      +
      +

      Returns

      +
      +
      string
      +
      the filename of the exported file
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPattern.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPattern.xhtml index b39515c..74804ec 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPattern.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPattern.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::getExportPattern @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -89,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPatternForMultipleDocuments.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPatternForMultipleDocuments.xhtml new file mode 100644 index 0000000..ed6571b --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getExportPatternForMultipleDocuments.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getExportPatternForMultipleDocuments + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getExportPatternForMultipleDocuments

    +

    Return export pattern for multiple documents config value

    +

    +

      +

      Signature

      +
      + public function getExportPatternForMultipleDocuments(string + $type ) + +
      +

      Parameters

      +
      +
      $type + — + string
      +
      the type of this document like invoice, shipment or creditmemo
      +
      +

      Returns

      +
      +
      string
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFontPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFontPath.xhtml index f475836..909deed 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFontPath.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFontPath.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::getFontPath @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFooterColor.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFooterColor.xhtml new file mode 100644 index 0000000..a5d9e87 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getFooterColor.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getFooterColor + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getFooterColor

    +

    Get footer color

    +

    +

      +

      Signature

      +
      + public function getFooterColor() + +
      +

      Returns

      +
      +
      Zend_Pdf_Color_Html
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getGuestorderCustomerNo.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getGuestorderCustomerNo.xhtml new file mode 100644 index 0000000..3b7466c --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getGuestorderCustomerNo.xhtml @@ -0,0 +1,101 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getGuestorderCustomerNo + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getGuestorderCustomerNo

    +

    Get customer number for guest orders.

    +

    +

      +

      Signature

      +
      + public function getGuestorderCustomerNo([string + $mode = 'invoice', + [mixed + $store = NULL]] ) + +
      +

      Parameters

      +
      +
      $mode + — + string
      +
      the mode of this document like invoice, shipment or creditmemo
      +
      $store + — + mixed
      +
      store to get information from
      +
      +

      Returns

      +
      +
      string
      +
      customer number for guest orders
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getHeaderColor.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getHeaderColor.xhtml new file mode 100644 index 0000000..0dbbdc9 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getHeaderColor.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getHeaderColor + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getHeaderColor

    +

    Get table header color

    +

    +

      +

      Signature

      +
      + public function getHeaderColor() + +
      +

      Returns

      +
      +
      Zend_Pdf_Color_Html
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getLabelColor.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getLabelColor.xhtml new file mode 100644 index 0000000..934d67c --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getLabelColor.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getLabelColor + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getLabelColor

    +

    Get label color

    +

    +

      +

      Signature

      +
      + public function getLabelColor() + +
      +

      Returns

      +
      +
      Zend_Pdf_Color_Html
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getModelVars.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getModelVars.xhtml index 2b32063..1248aa4 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getModelVars.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getModelVars.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::getModelVars @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -89,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getPageSizeConfigPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getPageSizeConfigPath.xhtml new file mode 100644 index 0000000..86f5143 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getPageSizeConfigPath.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getPageSizeConfigPath + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getPageSizeConfigPath

    +

    +

    +

    Signature

    +
    + public function getPageSizeConfigPath() + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getScaledImageSize.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getScaledImageSize.xhtml index 4fdc473..fb87ee2 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getScaledImageSize.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getScaledImageSize.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::getScaledImageSize @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -101,7 +101,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/getTextColor.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getTextColor.xhtml new file mode 100644 index 0000000..b0cd980 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/getTextColor.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::getTextColor + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::getTextColor

    +

    Get text color

    +

    +

      +

      Signature

      +
      + public function getTextColor() + +
      +

      Returns

      +
      +
      Zend_Pdf_Color_Html
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/isLogoFullWidth.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/isLogoFullWidth.xhtml index f7bb4bb..adf505b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/isLogoFullWidth.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/isLogoFullWidth.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::isLogoFullWidth @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/putOrderId.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/putOrderId.xhtml index 579cae8..05a6b72 100644 --- a/docs/api/html/classes/FireGento_Pdf_Helper_Data/putOrderId.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/putOrderId.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Helper_Data::putOrderId @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,7 +70,7 @@ @@ -72,8 +72,8 @@
    public function showCustomerNumber([string $mode = 'invoice', - mixed - $store] ) + [mixed + $store = NULL]] )

    Parameters

    @@ -96,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Data/showCustomerVATNumber.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Data/showCustomerVATNumber.xhtml new file mode 100644 index 0000000..1fa14a9 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Data/showCustomerVATNumber.xhtml @@ -0,0 +1,102 @@ + + + + + phpDox - FireGento_Pdf_Helper_Data::showCustomerVATNumber + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Data::showCustomerVATNumber

    +

    Whether the customer VAT number should be shown.

    +

    +

      +

      Signature

      +
      + public function showCustomerVATNumber([string + $mode = 'invoice', + [mixed + $store = NULL]] ) + +
      +

      Parameters

      +
      +
      $mode + — + string
      +
      the mode of this document like invoice, shipment or creditmemo
      +
      $store + — + mixed
      +
      store to get information from
      +
      +

      Returns

      +
      +
      bool
      +
      whether the customer number should be shown
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Invoice.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Invoice.xhtml new file mode 100644 index 0000000..75d1355 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Invoice.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Helper_Invoice + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Helper_Invoice

    +

    Helper for invoice creation.

    +

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +
    +

    Synopsis

    +
    class FireGento_Pdf_Helper_Invoice + extends Mage_Core_Helper_Abstract + {
    + + }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Core_Helper_Abstract
    • +
    +
    +

    Methods

    +
    +

    public

    + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Helper_Invoice/getShippingCountryNotes.xhtml b/docs/api/html/classes/FireGento_Pdf_Helper_Invoice/getShippingCountryNotes.xhtml new file mode 100644 index 0000000..bc42081 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Helper_Invoice/getShippingCountryNotes.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Helper_Invoice::getShippingCountryNotes + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Helper_Invoice::getShippingCountryNotes

    +

    Gets the notes for the shipping country of the given order.

    +

    +

      +

      Signature

      +
      + public function getShippingCountryNotes(Mage_Sales_Model_Order + $order ) + +
      +

      Parameters

      +
      +
      $order + — + Mage_Sales_Model_Order
      +



      +
      +

      Returns

      +
      +
      array
      +
      the notes for the shipping country of the given order - may be empty!
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo.xhtml index 265394f..7ae1964 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo.xhtml @@ -46,6 +46,9 @@
  • Synopsis
  • +
  • + Hierarchy +
  • Members
  • @@ -53,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -63,24 +66,30 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Creditmemo - {
    • // members
    • private Mage_Sales_Model_Order_Pdf_Abstract $_engine; + extends Mage_Sales_Model_Order_Pdf_Creditmemo + {
      • // members
      • protected Mage_Sales_Model_Order_Pdf_Abstract $_engine;
      • // methods
      • protected Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Creditmemo getEngine()
      • public Zend_Pdf getPdf()
      }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Sales_Model_Order_Pdf_Creditmemo
    • +
    +

    Members

    -

    private

    +

    protected

    Methods

    @@ -99,7 +108,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getEngine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getEngine.xhtml index 12a2309..4365034 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getEngine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getEngine.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Creditmemo::getEngine @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getPdf.xhtml index c90c3e6..de656b0 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Creditmemo/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Creditmemo::getPdf @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $creditmemos ) + public function getPdf([array + $creditmemos = ] )

      Parameters

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract.xhtml index 5fdb893..49590c9 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract.xhtml @@ -59,7 +59,7 @@ Methods
    • - Source + Source
    @@ -69,25 +69,30 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Engine_Abstract - extends Mage_Sales_Model_Order_Pdf_Abstract - {
    @@ -131,21 +140,7 @@

    Tasks

    @@ -157,73 +152,69 @@ - 342+ + 344+ merge _insertLogoPositioned and _insertLogoFullWidth

    Members

    +

    private

    +
      +
    • $_headerLines + — + array
    • +
    • $defaultFontSize + — + int
    • +

    protected

      -
    • - $_imprint -
    • +
    • $_imprint + — + array
    • $_marginTop — int

    public

      -
    • - $colors -
    • -
    • - $encoding -
    • -
    • - $margin -
    • -
    • - $mode -
    • -
    • - $pagecounter -
    • +
    • $colors + — + array
    • +
    • $encoding + — + string
    • +
    • $margin + — + array
    • +
    • $mode + — + string
    • +
    • $pagecounter + — + string

    Methods

    private

    protected

    public

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/ItalicFontFileExists.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/ItalicFontFileExists.xhtml index d9d0178..3c1a546 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/ItalicFontFileExists.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/ItalicFontFileExists.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::ItalicFontFileExists @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -67,7 +67,7 @@

      Signature

      - private function ItalicFontFileExists() + protected function ItalicFontFileExists()

      Returns

      @@ -79,7 +79,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/Ln.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/Ln.xhtml index 621be70..d6e8e32 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/Ln.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/Ln.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::Ln @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/__construct.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/__construct.xhtml index 3631465..4df6d3c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/__construct.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/__construct.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::__construct @@ -53,15 +53,14 @@ Synopsis
  • - Source + Source
  • FireGento_Pdf_Model_Engine_Abstract::__construct

    -

    constructor to init settings

    +

    -

      Signature

      public function __construct() @@ -70,7 +69,7 @@

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_addFooter.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_addFooter.xhtml index ab8169f..42e3c94 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_addFooter.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_addFooter.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_addFooter @@ -56,7 +56,7 @@ Parameter
  • - Source + Source
  • @@ -67,18 +67,18 @@

      Signature

      - protected function _addFooter(& + protected function _addFooter(Zend_Pdf_Page $page, [mixed - $store = null] ) + $store = NULL] )

      Parameters

      $page — -
      -
      + object +
      page to draw on


      $store — mixed
      @@ -87,7 +87,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_drawItem.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_drawItem.xhtml index 020a872..03d76b6 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_drawItem.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_drawItem.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_drawItem @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,29 +70,29 @@

      Signature

      - protected function _drawItem(Varien_Object + protected function _drawItem(Varien_Object $item, - [Zend_Pdf_Page - $page = 1, - [Mage_Sales_Model_Order - $order = 1, + Zend_Pdf_Page + $page, + Mage_Sales_Model_Order + $order, [integer - $position = 1]]] ) + $position = 1] )

      Parameters

      $item — - Varien_Object
      + Varien_Object
      creditmemo/shipping/invoice to draw


      $page — - Zend_Pdf_Page
      + Zend_Pdf_Page
      Current page object of Zend_Pdf


      $order — - Mage_Sales_Model_Order
      + Mage_Sales_Model_Order
      order to get infos from


      $position — @@ -108,7 +108,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_getGuestorderCustomerNo.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_getGuestorderCustomerNo.xhtml new file mode 100644 index 0000000..331a723 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_getGuestorderCustomerNo.xhtml @@ -0,0 +1,95 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Abstract::_getGuestorderCustomerNo + + + + + +
      +
      + +
      + +
      +

      FireGento_Pdf_Model_Engine_Abstract::_getGuestorderCustomerNo

      +

      which customer number should be displayed for guest orders

      +

      +

        +

        Signature

        +
        + protected function _getGuestorderCustomerNo(mixed + $store ) + +
        +

        Parameters

        +
        +
        $store + — + mixed
        +
        store from whom we need the config setting
        +
        +

        Returns

        +
        +
        string
        +
        +
        +
      +
      +
      + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
      + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertCustomerAddress.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertCustomerAddress.xhtml index 3a5eda9..5779d7d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertCustomerAddress.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertCustomerAddress.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertCustomerAddress @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,7 +70,7 @@

      Signature

      - protected function _insertCustomerAddress(& + protected function _insertCustomerAddress(Zend_Pdf_Page $page, Mage_Sales_Model_Order $order ) @@ -80,8 +80,8 @@
      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $order — object
      @@ -96,7 +96,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooter.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooter.xhtml index 2b49d22..e110b5e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooter.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooter.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertFooter @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,7 +70,7 @@

      Signature

      - protected function _insertFooter(& + protected function _insertFooter(Zend_Pdf_Page $page )
      @@ -78,8 +78,8 @@
      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      Returns

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterAddress.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterAddress.xhtml index a3a59b7..e88e6c3 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterAddress.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterAddress.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertFooterAddress @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,18 +70,18 @@

      Signature

      - protected function _insertFooterAddress(& + protected function _insertFooterAddress(Zend_Pdf_Page $page, [mixed - $store = null] ) + $store = NULL] )

      Parameters

      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $store — mixed
      @@ -96,7 +96,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterBlock.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterBlock.xhtml index bd9179e..71cc663 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterBlock.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertFooterBlock.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertFooterBlock @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,24 +70,24 @@

      Signature

      - protected function _insertFooterBlock(& + protected function _insertFooterBlock(Zend_Pdf_Page $page, - [array - $fields = 0, - [int + array + $fields, + [integer $colposition = 0, - [int + [integer $valadjust = 30, [int - $colwidth = null]]]] ) + $colwidth = NULL]]] )

      Parameters

      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $fields — array
      @@ -114,7 +114,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoFullWidth.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoFullWidth.xhtml index cbfcfd5..08e5b72 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoFullWidth.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoFullWidth.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertLogoFullWidth @@ -59,7 +59,7 @@ Tasks
    • - Source + Source
    @@ -70,18 +70,18 @@

      Signature

      - protected function _insertLogoFullWidth(& + protected function _insertLogoFullWidth(Zend_Pdf_Page $page, [mixed - $store = null] ) + $store = NULL] )

      Parameters

      $page — -
      -
      + object +
      current Zend_Pdf_Page object


      $store — mixed
      @@ -95,14 +95,14 @@ - 342+ + 344+ merge _insertLogoPositioned and _insertLogoFullWidth
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoPositioned.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoPositioned.xhtml index 3125c61..e7b1c7d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoPositioned.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertLogoPositioned.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertLogoPositioned @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,18 +70,18 @@

      Signature

      - protected function _insertLogoPositioned(& + protected function _insertLogoPositioned(Zend_Pdf_Page $page, [mixed - $store = null] ) + $store = NULL] )

      Parameters

      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $store — mixed
      @@ -96,7 +96,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertNote.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertNote.xhtml index e686c46..d617e1a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertNote.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertNote.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertNote @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -72,9 +72,9 @@
    protected function _insertNote(Zend_Pdf_Page $page, - & + Mage_Sales_Model_Order $order, - & + Mage_Sales_Model_Abstract $model )
    @@ -86,12 +86,12 @@
    Current Page Object of Zend_PDF


    $order — -
    -
    + object +
    order to get note from


    $model — -
    -
    + object +
    invoice/shipment/creditmemo


    Returns

    @@ -102,7 +102,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertPageCounter.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertPageCounter.xhtml index 94d5268..d020de7 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertPageCounter.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertPageCounter.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertPageCounter @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,7 +70,7 @@

      Signature

      - protected function _insertPageCounter(& + protected function _insertPageCounter(Zend_Pdf_Page $page )
      @@ -78,8 +78,8 @@
      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      Returns

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddessBar.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddressBar.xhtml similarity index 79% rename from docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddessBar.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddressBar.xhtml index 386e339..64ef944 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddessBar.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_insertSenderAddressBar.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_insertSenderAddressBar @@ -41,7 +41,7 @@
    • FireGento_Pdf_Model_Engine_Abstract
    • -
    • _insertSenderAddessBar
    • +
    • _insertSenderAddressBar
    -

    FireGento_Pdf_Model_Engine_Abstract::_insertSenderAddessBar

    +

    FireGento_Pdf_Model_Engine_Abstract::_insertSenderAddressBar

    Insert sender address bar

      Signature

      - protected function _insertSenderAddessBar(& + protected function _insertSenderAddressBar(Zend_Pdf_Page $page )
      @@ -78,8 +78,8 @@
      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      Returns

      @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_isLogoFullWidth.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_isLogoFullWidth.xhtml index 5f532c7..9aacb01 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_isLogoFullWidth.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_isLogoFullWidth.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_isLogoFullWidth @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_prepareText.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_prepareText.xhtml index 72ebfaa..b79c67b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_prepareText.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_prepareText.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_prepareText @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -72,14 +72,14 @@
    public function _prepareText(string $text, - [Zend_Pdf_Page - $page = null, - [Zend_Pdf_Resource_Font - $font = null, + Zend_Pdf_Page + $page, + Zend_Pdf_Resource_Font + $font, + int + $fontSize, [int - $fontSize = null, - [int - $width = null]]]] ) + $width = NULL] )

    Parameters

    @@ -113,7 +113,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_putOrderId.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_putOrderId.xhtml index 586393a..3f2f0e0 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_putOrderId.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_putOrderId.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_putOrderId @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontBold.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontBold.xhtml index 155f765..50b994e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontBold.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontBold.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_setFontBold @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -96,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontItalic.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontItalic.xhtml index 7f6a74f..314dcd0 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontItalic.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontItalic.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_setFontItalic @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -96,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontRegular.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontRegular.xhtml index 240c0e2..5a242f7 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontRegular.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_setFontRegular.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_setFontRegular @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -96,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerNumber.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerNumber.xhtml index 1079477..90c48ff 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerNumber.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerNumber.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::_showCustomerNumber @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerVATNumber.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerVATNumber.xhtml new file mode 100644 index 0000000..703fc3c --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/_showCustomerVATNumber.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Abstract::_showCustomerVATNumber + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Engine_Abstract::_showCustomerVATNumber

    +

    do we show the customber VAT number on this document

    +

    +

      +

      Signature

      +
      + protected function _showCustomerVATNumber(mixed + $store ) + +
      +

      Parameters

      +
      +
      $store + — + mixed
      +
      store from whom we need the config setting
      +
      +

      Returns

      +
      +
      bool
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/boldFontFileExists.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/boldFontFileExists.xhtml new file mode 100644 index 0000000..c00c741 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/boldFontFileExists.xhtml @@ -0,0 +1,85 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Abstract::boldFontFileExists + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Engine_Abstract::boldFontFileExists

    +

    check whether font file exists for bold font

    +

    +

      +

      Signature

      +
      + protected function boldFontFileExists() + +
      +

      Returns

      +
      +
      bool
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/drawLineBlocks.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/drawLineBlocks.xhtml index 9455280..4a4c497 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/drawLineBlocks.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/drawLineBlocks.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::drawLineBlocks @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,19 +70,19 @@

      Signature

      - public function drawLineBlocks(Zend_Pdf_Page + public function drawLineBlocks(Zend_Pdf_Page $page, array $draw, - array - $pageSettings ) + [array + $pageSettings = ] )

      Parameters

      $page — - Zend_Pdf_Page
      + Zend_Pdf_Page
      Current page object of Zend_Pdf


      $draw — @@ -102,7 +102,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/fixNumberFormat.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/fixNumberFormat.xhtml index fb1793a..d281752 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/fixNumberFormat.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/fixNumberFormat.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::fixNumberFormat @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,7 +70,7 @@

      Signature

      - private function fixNumberFormat(string + protected function fixNumberFormat(string $label )
      @@ -89,7 +89,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFont.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFont.xhtml index 7ca6a92..b156616 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFont.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFont.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getBoldFont @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -67,7 +67,7 @@

      Signature

      - private function getBoldFont() + protected function getBoldFont()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFontFile.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFontFile.xhtml index 36605eb..ea7a253 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFontFile.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getBoldFontFile.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getBoldFontFile @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -67,7 +67,7 @@

      Signature

      - private function getBoldFontFile() + protected function getBoldFontFile()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontBold.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontBold.xhtml index 132fad8..df69066 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontBold.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontBold.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getFontBold @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontItalic.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontItalic.xhtml index 24ed1de..d47bb01 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontItalic.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontItalic.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getFontItalic @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontRegular.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontRegular.xhtml index 781de58..8ab6d12 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontRegular.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getFontRegular.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getFontRegular @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getHeaderblockOffset.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getHeaderblockOffset.xhtml index 03b0628..94c6dc1 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getHeaderblockOffset.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getHeaderblockOffset.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getHeaderblockOffset @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFont.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFont.xhtml index 78ad8fe..d2ec2ff 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFont.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFont.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getItalicFont @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -67,7 +67,7 @@

      Signature

      - private function getItalicFont() + protected function getItalicFont()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFontFile.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFontFile.xhtml index 77bdfbf..fa3e338 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFontFile.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getItalicFontFile.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getItalicFontFile @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -67,7 +67,7 @@

      Signature

      - private function getItalicFontFile() + protected function getItalicFontFile()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getMode.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getMode.xhtml index 62f9140..40afabd 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getMode.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getMode.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getMode @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getPageSize.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getPageSize.xhtml new file mode 100644 index 0000000..4c840ce --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getPageSize.xhtml @@ -0,0 +1,84 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Abstract::getPageSize + + + + + +
    + + +
    +

    FireGento_Pdf_Model_Engine_Abstract::getPageSize

    +

    +

    +

      +

      Signature

      +
      + private function getPageSize() + +
      +

      Returns

      +
      +
      string
      +
      +
      +

    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFont.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFont.xhtml index 22b6fc4..ab7372a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFont.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFont.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getRegularFont @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -67,7 +67,7 @@

      Signature

      - private function getRegularFont() + protected function getRegularFont()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFontFile.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFontFile.xhtml index 822f443..30379d3 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFontFile.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/getRegularFontFile.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::getRegularFontFile @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -67,7 +67,7 @@

      Signature

      - private function getRegularFontFile() + protected function getRegularFontFile()

      Returns

      @@ -78,7 +78,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertAddressesAndHeader.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertAddressesAndHeader.xhtml index 55a65e4..1856394 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertAddressesAndHeader.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertAddressesAndHeader.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::insertAddressesAndHeader @@ -56,7 +56,7 @@ Parameter
    • - Source + Source
    @@ -67,11 +67,11 @@ @@ -70,7 +70,7 @@

      Signature

      - protected function insertHeader(& + protected function insertHeader(Zend_Pdf_Page $page, Mage_Sales_Model_Order $order, @@ -82,8 +82,8 @@
      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $order — object
      @@ -102,7 +102,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertLogo.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertLogo.xhtml index 7061fcb..aede966 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertLogo.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertLogo.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::insertLogo @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,18 +70,18 @@

      Signature

      - protected function insertLogo(& + protected function insertLogo(Zend_Pdf_Page& $page, [mixed - $store = null] ) + $store = NULL] )

      Parameters

      $page — -
      -
      + object +
      Current page object of Zend_Pdf


      $store — mixed
      @@ -96,7 +96,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertTotals.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertTotals.xhtml index 396a3f8..aa751e4 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertTotals.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/insertTotals.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::insertTotals @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -96,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/newPage.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/newPage.xhtml index 85293dd..c6bcafa 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/newPage.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/newPage.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::newPage @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function newPage(array - $settings ) + public function newPage([array + $settings = ] )

      Parameters

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/regularFontFileExists.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/regularFontFileExists.xhtml index d46adb8..8d80485 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/regularFontFileExists.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/regularFontFileExists.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::regularFontFileExists @@ -56,19 +56,18 @@ Return
    • - Source + Source

    FireGento_Pdf_Model_Engine_Abstract::regularFontFileExists

    -

    check whether font file exists for bold font

    +

    check whether font file exists for regular font

      -

        Signature

        - private function regularFontFileExists() + protected function regularFontFileExists()

        Returns

        @@ -80,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setFont.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setFont.xhtml new file mode 100644 index 0000000..4d0dae8 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setFont.xhtml @@ -0,0 +1,102 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Abstract::setFont + + + + + +
    + + +
    +

    FireGento_Pdf_Model_Engine_Abstract::setFont

    +

    +

    +

    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setMode.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setMode.xhtml index 81201ec..20fd5a0 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setMode.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Abstract/setMode.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Abstract::setMode @@ -59,7 +59,7 @@
    Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xhtml index c467f96..4dc2726 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xhtml @@ -59,7 +59,7 @@ Methods
  • - Source + Source
  • @@ -69,18 +69,16 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Engine_Creditmemo_Default extends FireGento_Pdf_Model_Engine_Abstract {
    }
    @@ -126,7 +137,7 @@

    Extends

    @@ -139,7 +150,7 @@ - 342+ + 344+ merge _insertLogoPositioned and _insertLogoFullWidth @@ -147,30 +158,30 @@

    protected

      -
    • - $_imprint -
    • +
    • $_imprint + — + array
    • $_marginTop — int

    public

      -
    • - $colors -
    • -
    • - $encoding -
    • -
    • - $margin -
    • -
    • - $mode -
    • -
    • - $pagecounter -
    • +
    • $colors + — + array
    • +
    • $encoding + — + string
    • +
    • $margin + — + array
    • +
    • $mode + — + string
    • +
    • $pagecounter + — + string

    Methods

    @@ -192,12 +203,16 @@

    Inherited from FireGento_Pdf_Model_Engine_Abstract

    protected

    public

      @@ -262,7 +300,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/__construct.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/__construct.xhtml index 5a0409d..d2b5715 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/__construct.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/__construct.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Creditmemo_Default::__construct @@ -53,7 +53,7 @@ Synopsis
    • - Source + Source
    @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_drawHeader.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_drawHeader.xhtml index f8a41b3..8b17e22 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_drawHeader.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_drawHeader.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Creditmemo_Default::_drawHeader @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,7 +70,7 @@

      Signature

      - protected function _drawHeader(Zend_Pdf_Page + protected function _drawHeader(Zend_Pdf_Page $page )
      @@ -78,7 +78,7 @@
      $page — - Zend_Pdf_Page
      + Zend_Pdf_Page
      page to draw on


      Returns

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_initRenderer.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_initRenderer.xhtml index 036c90b..05e8e07 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_initRenderer.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/_initRenderer.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Creditmemo_Default::_initRenderer @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/getPdf.xhtml index 23c9a45..b645bd7 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Creditmemo_Default::getPdf @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $creditmemos ) + public function getPdf([array + $creditmemos = ] )

      Parameters

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xhtml index 2b75e0e..92a156e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xhtml @@ -59,7 +59,7 @@ Methods
    • - Source + Source
    @@ -69,18 +69,16 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Engine_Invoice_Default extends FireGento_Pdf_Model_Engine_Abstract {
    }
    @@ -126,7 +137,7 @@

    Extends

    @@ -139,7 +150,7 @@ - 342+ + 344+ merge _insertLogoPositioned and _insertLogoFullWidth @@ -147,30 +158,30 @@

    protected

      -
    • - $_imprint -
    • +
    • $_imprint + — + array
    • $_marginTop — int

    public

      -
    • - $colors -
    • -
    • - $encoding -
    • -
    • - $margin -
    • -
    • - $mode -
    • -
    • - $pagecounter -
    • +
    • $colors + — + array
    • +
    • $encoding + — + string
    • +
    • $margin + — + array
    • +
    • $mode + — + string
    • +
    • $pagecounter + — + string

    Methods

    @@ -192,12 +203,16 @@

    Inherited from FireGento_Pdf_Model_Engine_Abstract

    protected

    public

      @@ -262,7 +300,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/__construct.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/__construct.xhtml index 551d70e..2ce2c1b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/__construct.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/__construct.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Invoice_Default::__construct @@ -53,7 +53,7 @@ Synopsis
    • - Source + Source
    @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/_initRenderer.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/_initRenderer.xhtml index 91adcb9..6dccfe4 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/_initRenderer.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/_initRenderer.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Invoice_Default::_initRenderer @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/getPdf.xhtml index 8c7afc6..b863e50 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Invoice_Default::getPdf @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $invoices ) + public function getPdf([array + $invoices = ] )

      Parameters

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/insertTableHeader.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/insertTableHeader.xhtml index 7556ebc..7c1d3b9 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/insertTableHeader.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Invoice_Default/insertTableHeader.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Invoice_Default::insertTableHeader @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,7 +70,7 @@

      Signature

      - protected function insertTableHeader(& + protected function insertTableHeader(Zend_Pdf_Page $page )
      @@ -78,8 +78,8 @@
      $page — -
      -
      + object +
      current page object of Zend_PDF


      Returns

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xhtml index edac693..ab60767 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xhtml @@ -59,7 +59,7 @@ Methods
    • - Source + Source
    @@ -69,31 +69,30 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Engine_Shipment_Default extends FireGento_Pdf_Model_Engine_Abstract {
    }
    @@ -128,7 +140,7 @@

    Extends

    @@ -141,7 +153,7 @@ - 342+ + 344+ merge _insertLogoPositioned and _insertLogoFullWidth @@ -149,30 +161,30 @@

    protected

      -
    • - $_imprint -
    • +
    • $_imprint + — + array
    • $_marginTop — int

    public

      -
    • - $colors -
    • -
    • - $encoding -
    • -
    • - $margin -
    • -
    • - $mode -
    • -
    • - $pagecounter -
    • +
    • $colors + — + array
    • +
    • $encoding + — + string
    • +
    • $margin + — + array
    • +
    • $mode + — + string
    • +
    • $pagecounter + — + string

    Methods

    @@ -183,6 +195,8 @@ — Initialize renderer process.
  • _insertCustomerAddress() — Inserts the customer's shipping address.
  • +
  • _printShipmentTracks() + — This will print all the shipment tracks.
  • insertShippingAddress() — insert address into pdf
  • insertTableHeader() @@ -198,12 +212,16 @@

    Inherited from FireGento_Pdf_Model_Engine_Abstract

    protected

    public

      @@ -268,7 +309,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/__construct.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/__construct.xhtml index bc15304..4f9cb86 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/__construct.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/__construct.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::__construct @@ -53,7 +53,7 @@ Synopsis
    • - Source + Source
    @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_initRenderer.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_initRenderer.xhtml index bc49435..59b876f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_initRenderer.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_initRenderer.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::_initRenderer @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_insertCustomerAddress.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_insertCustomerAddress.xhtml index 0a4df38..509aa7c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_insertCustomerAddress.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_insertCustomerAddress.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::_insertCustomerAddress @@ -62,7 +62,7 @@ Overrides
  • - Source + Source
  • @@ -73,7 +73,7 @@

      Signature

      - protected function _insertCustomerAddress(& + protected function _insertCustomerAddress(Zend_Pdf_Page $page, Mage_Sales_Model_Order $order ) @@ -83,8 +83,8 @@
      $page — -
      -
      + object +
      current page object of Zend_Pdf


      $order — object
      @@ -107,7 +107,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_printShipmentTracks.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_printShipmentTracks.xhtml new file mode 100644 index 0000000..867f7b2 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/_printShipmentTracks.xhtml @@ -0,0 +1,108 @@ + + + + + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::_printShipmentTracks + + + + + +
      +
      + +
      + +
      +

      FireGento_Pdf_Model_Engine_Shipment_Default::_printShipmentTracks

      +

      This will print all the shipment tracks.

      +

      +

      +
      +
      + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
      + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/getPdf.xhtml index dc23675..ddc0e69 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::getPdf @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $shipments ) + public function getPdf([array + $shipments = ] )

      Parameters

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertShippingAddress.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertShippingAddress.xhtml index 6016ec2..be4e72e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertShippingAddress.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertShippingAddress.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::insertShippingAddress @@ -56,7 +56,7 @@ Parameter
    • - Source + Source
    @@ -87,7 +87,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertTableHeader.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertTableHeader.xhtml index 29a8745..bb49c82 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertTableHeader.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Engine_Shipment_Default/insertTableHeader.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Engine_Shipment_Default::insertTableHeader @@ -56,7 +56,7 @@ Parameter
  • - Source + Source
  • @@ -81,7 +81,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Invoice.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Invoice.xhtml index 8fb3401..d212974 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Invoice.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Invoice.xhtml @@ -46,6 +46,9 @@
  • Synopsis
  • +
  • + Hierarchy +
  • Members
  • @@ -53,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -63,24 +66,30 @@

    The invoice model serves as a proxy to the actual PDF engine as set via
    backend configuration.

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Invoice - {
    • // members
    • private Mage_Sales_Model_Order_Pdf_Abstract $_engine; + extends Mage_Sales_Model_Order_Pdf_Invoice + {
      • // members
      • protected Mage_Sales_Model_Order_Pdf_Abstract $_engine;
      • // methods
      • protected Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Invoice getEngine()
      • public mixed getPdf()
      }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Sales_Model_Order_Pdf_Invoice
    • +
    +

    Members

    -

    private

    +

    protected

    Methods

    @@ -99,7 +108,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getEngine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getEngine.xhtml index 4c2f08f..5a904ae 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getEngine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getEngine.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Invoice::getEngine @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getPdf.xhtml index 42d8b2d..cd65a8b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Invoice/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Invoice::getPdf @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $invoices ) + public function getPdf([array + $invoices = ] )

      Parameters

      @@ -89,7 +89,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle.xhtml index 8ad984f..d39c2e8 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle.xhtml @@ -53,7 +53,7 @@ Methods
    • - Source + Source
    @@ -63,12 +63,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Items_Bundle - extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice + extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice {
    • // methods
    • public void draw()
    @@ -77,9 +75,7 @@

    Extends

    Methods

    @@ -93,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle/draw.xhtml index e44723c..9feb26d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Bundle/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Bundle::draw @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Default.xhtml index cec93fd..f9752b8 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Default.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Default.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,12 +63,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Items_Default - extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Default + extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Default {
    • // methods
    • public void draw()
    @@ -77,9 +75,7 @@

    Extends

    Methods

    @@ -93,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Default/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Default/draw.xhtml index 96d2e61..012a39f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Default/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Default/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Default::draw @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable.xhtml index a302343..36f0f53 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -66,7 +66,7 @@

    Synopsis

    class FireGento_Pdf_Model_Items_Downloadable - extends Mage_Downloadable_Model_Sales_Order_Pdf_Items_Invoice + extends Mage_Downloadable_Model_Sales_Order_Pdf_Items_Invoice {
    • // methods
    • public void draw()
    @@ -75,9 +75,7 @@

    Extends

    Methods

    @@ -91,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable/draw.xhtml index a59d002..82fa43f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Downloadable/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Downloadable::draw @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped.xhtml index de24c25..1ff376d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,12 +63,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Items_Grouped - extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped + extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped {
    • // methods
    • public void draw()
    @@ -77,9 +75,7 @@

    Extends

    Methods

    @@ -93,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped/draw.xhtml index 8c3ef84..301f37e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Grouped/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Grouped::draw @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xhtml index 3b14c74..158c7c3 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,12 +63,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Items_Shipment_Bundle - extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment + extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment {
    • // methods
    • public void draw()
    @@ -77,9 +75,7 @@

    Extends

    Methods

    @@ -93,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle/draw.xhtml index 67a90c2..234d08c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Bundle/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Shipment_Bundle::draw @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default.xhtml index 3b93ea9..065fca1 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,12 +63,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Items_Shipment_Default - extends Mage_Sales_Model_Order_Pdf_Items_Shipment_Default + extends Mage_Sales_Model_Order_Pdf_Items_Shipment_Default {
    • // methods
    • public void draw()
    @@ -77,9 +75,7 @@

    Extends

    Methods

    @@ -93,7 +89,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default/draw.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default/draw.xhtml index 71c8f85..5d7bba7 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default/draw.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Shipment_Default/draw.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Items_Shipment_Default::draw @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xhtml new file mode 100644 index 0000000..5ce4d9e --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xhtml @@ -0,0 +1,105 @@ + + + + + phpDox - FireGento_Pdf_Model_Items_Unirgy_Default + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Model_Items_Unirgy_Default

    +

    Default item model rewrite.

    +

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +
    +

    Synopsis

    +
    class FireGento_Pdf_Model_Items_Unirgy_Default + extends FireGento_Pdf_Model_Items_Default + {
    • // Inherited methods from FireGento_Pdf_Model_Items_Default
    • public void draw() +
    + + }
    +

    Hierarchy

    +
    +

    Extends

    + +
    +

    Methods

    +
    +

    public

    + +

    Inherited from FireGento_Pdf_Model_Items_Default

    +

    public

    +
      +
    • draw() + — Draw item line.
    • +
    +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default/getItemOptions.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default/getItemOptions.xhtml new file mode 100644 index 0000000..e2258ef --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Default/getItemOptions.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Model_Items_Unirgy_Default::getItemOptions + + + + + +
    + + +
    +

    FireGento_Pdf_Model_Items_Unirgy_Default::getItemOptions

    +

    +

    +

    Signature

    +
    + public function getItemOptions() + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xhtml new file mode 100644 index 0000000..e5eb023 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xhtml @@ -0,0 +1,105 @@ + + + + + phpDox - FireGento_Pdf_Model_Items_Unirgy_Shipment_Default + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Model_Items_Unirgy_Shipment_Default

    +

    Default item model rewrite.

    +

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +
    +

    Synopsis

    +
    class FireGento_Pdf_Model_Items_Unirgy_Shipment_Default + extends FireGento_Pdf_Model_Items_Shipment_Default + {
    • // Inherited methods from FireGento_Pdf_Model_Items_Shipment_Default
    • public void draw() +
    + + }
    +

    Hierarchy

    + +

    Methods

    +
    +

    public

    + +

    Inherited from FireGento_Pdf_Model_Items_Shipment_Default

    +

    public

    +
      +
    • draw() + — Draw item line.
    • +
    +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default/getItemOptions.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default/getItemOptions.xhtml new file mode 100644 index 0000000..cc947f4 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default/getItemOptions.xhtml @@ -0,0 +1,75 @@ + + + + + phpDox - FireGento_Pdf_Model_Items_Unirgy_Shipment_Default::getItemOptions + + + + + +
    + + +
    +

    FireGento_Pdf_Model_Items_Unirgy_Shipment_Default::getItemOptions

    +

    +

    +

    Signature

    +
    + public function getItemOptions() + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer.xhtml index 538d740..9878b05 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer.xhtml @@ -50,7 +50,7 @@ Methods
  • - Source + Source
  • @@ -60,45 +60,67 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Observer {
    }

    Methods

    -

    public

    +

    protected

    +

    public

    +
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addBarcode.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addBarcode.xhtml new file mode 100644 index 0000000..622c03a --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addBarcode.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::_addBarcode + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::_addBarcode

    +

    Adds a barcode representing the order number to a PDF

    +

    +

      +

      Signature

      +
      + protected function _addBarcode(Varien_Event_Observer + $observer ) + +
      +

      Parameters

      +
      +
      $observer + — + Varien_Event_Observer
      +
      observer which is passed by magento


      +
      +

      Returns

      +
      +
      FireGento_Pdf_Model_Observer
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addCreditmemoComments.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addCreditmemoComments.xhtml new file mode 100644 index 0000000..a2fbfef --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addCreditmemoComments.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::_addCreditmemoComments + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::_addCreditmemoComments

    +

    Add the credit memo comments

    +

    +

      +

      Signature

      +
      + protected function _addCreditmemoComments(Varien_Event_Observer + $observer ) + +
      +

      Parameters

      +
      +
      $observer + — + Varien_Event_Observer
      +
      observer object


      +
      +

      Returns

      +
      +
      FireGento_Pdf_Model_Observer
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceComments.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceComments.xhtml similarity index 78% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceComments.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceComments.xhtml index 8339e74..e22cb9c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceComments.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceComments.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::_addInvoiceComments @@ -41,7 +41,7 @@
  • FireGento_Pdf_Model_Observer
  • -
  • addInvoiceComments
  • +
  • _addInvoiceComments
  • -

    FireGento_Pdf_Model_Observer::addInvoiceComments

    +

    FireGento_Pdf_Model_Observer::_addInvoiceComments

    Add the invoice comments

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceDateNotice.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceDateNotice.xhtml similarity index 78% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceDateNotice.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceDateNotice.xhtml index 1cde0c7..e489f5a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceDateNotice.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceDateNotice.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::_addInvoiceDateNotice @@ -41,7 +41,7 @@
  • FireGento_Pdf_Model_Observer
  • -
  • addInvoiceDateNotice
  • +
  • _addInvoiceDateNotice
  • -

    FireGento_Pdf_Model_Observer::addInvoiceDateNotice

    +

    FireGento_Pdf_Model_Observer::_addInvoiceDateNotice

    add invoice date notice to pdf

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceMaturity.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceMaturity.xhtml similarity index 78% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceMaturity.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceMaturity.xhtml index f9b9f18..edf179d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceMaturity.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addInvoiceMaturity.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::_addInvoiceMaturity @@ -41,7 +41,7 @@
  • FireGento_Pdf_Model_Observer
  • -
  • addInvoiceMaturity
  • +
  • _addInvoiceMaturity
  • -

    FireGento_Pdf_Model_Observer::addInvoiceMaturity

    +

    FireGento_Pdf_Model_Observer::_addInvoiceMaturity

    Add maturity to invoice notes.

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addPaymentMethod.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addPaymentMethod.xhtml new file mode 100644 index 0000000..3db6b4a --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addPaymentMethod.xhtml @@ -0,0 +1,102 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::_addPaymentMethod + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::_addPaymentMethod

    +

    Add payment method to invoice / creditmemo notes.

    +

    +

      +

      Signature

      +
      + protected function _addPaymentMethod(Varien_Event_Observer + $observer, + + $mode ) + +
      +

      Parameters

      +
      +
      $observer + — + Varien_Event_Observer
      +
      observer object


      +
      $mode + — +
      +
      +
      +

      Returns

      +
      +
      FireGento_Pdf_Model_Observer
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShipmentComments.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShipmentComments.xhtml new file mode 100644 index 0000000..eba49c0 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShipmentComments.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::_addShipmentComments + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::_addShipmentComments

    +

    Add the shipment comments

    +

    +

      +

      Signature

      +
      + protected function _addShipmentComments(Varien_Event_Observer + $observer ) + +
      +

      Parameters

      +
      +
      $observer + — + Varien_Event_Observer
      +
      observer object


      +
      +

      Returns

      +
      +
      FireGento_Pdf_Model_Observer
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingCountryNotes.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingCountryNotes.xhtml new file mode 100644 index 0000000..285c5f0 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingCountryNotes.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::_addShippingCountryNotes + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::_addShippingCountryNotes

    +

    Add notes based on shipping country

    +

    +

    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShippingMethod.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingMethod.xhtml similarity index 78% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addShippingMethod.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingMethod.xhtml index 8e7dddb..0c88d32 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShippingMethod.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/_addShippingMethod.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::_addShippingMethod @@ -41,7 +41,7 @@
  • FireGento_Pdf_Model_Observer
  • -
  • addShippingMethod
  • +
  • _addShippingMethod
  • -

    FireGento_Pdf_Model_Observer::addShippingMethod

    +

    FireGento_Pdf_Model_Observer::_addShippingMethod

    Add shipping method to invoice notes.

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addCreditmemoNotes.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addCreditmemoNotes.xhtml new file mode 100644 index 0000000..074ce15 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addCreditmemoNotes.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::addCreditmemoNotes + + + + + +
    +
    + +
    + +
    +

    FireGento_Pdf_Model_Observer::addCreditmemoNotes

    +

    Add notes to credit memo document.

    +

    +

      +

      Signature

      +
      + public function addCreditmemoNotes(Varien_Event_Observer + $observer ) + +
      +

      Parameters

      +
      +
      $observer + — + Varien_Event_Observer
      +
      observer object


      +
      +

      Returns

      +
      +
      FireGento_Pdf_Model_Observer
      +

      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addBarcode.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceBarcode.xhtml similarity index 77% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addBarcode.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceBarcode.xhtml index 8cad5e4..cb05047 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addBarcode.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceBarcode.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::addInvoiceBarcode @@ -41,7 +41,7 @@
  • FireGento_Pdf_Model_Observer
  • -
  • addBarcode
  • +
  • addInvoiceBarcode
  • -

    FireGento_Pdf_Model_Observer::addBarcode

    -

    Adds a barcode representing the order number to the shipment if activated.

    +

    FireGento_Pdf_Model_Observer::addInvoiceBarcode

    +

    Adds a barcode representing the order number to the invoice if activated

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceNotes.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceNotes.xhtml index 52c3394..b00831f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceNotes.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addInvoiceNotes.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::addInvoiceNotes @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,7 +70,7 @@

      Signature

      - public function addInvoiceNotes(Varien_Event_Observer + public function addInvoiceNotes(Varien_Event_Observer $observer )
      @@ -78,7 +78,7 @@
      $observer — - Varien_Event_Observer
      + Varien_Event_Observer
      observer object


      Returns

      @@ -90,7 +90,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentBarcode.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentBarcode.xhtml new file mode 100644 index 0000000..2c5f3a5 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentBarcode.xhtml @@ -0,0 +1,96 @@ + + + + + phpDox - FireGento_Pdf_Model_Observer::addShipmentBarcode + + + + + +
      +
      + +
      + +
      +

      FireGento_Pdf_Model_Observer::addShipmentBarcode

      +

      Adds a barcode representing the order number to the shipment if activated

      +

      +

        +

        Signature

        +
        + public function addShipmentBarcode(Varien_Event_Observer + $observer ) + +
        +

        Parameters

        +
        +
        $observer + — + Varien_Event_Observer
        +
        observer which is passed by magento


        +
        +

        Returns

        +
        +
        FireGento_Pdf_Model_Observer
        +

        +
        +
        +
      +
      +
      + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
      + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addPaymentMethod.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentNotes.xhtml similarity index 76% rename from docs/api/html/classes/FireGento_Pdf_Model_Observer/addPaymentMethod.xhtml rename to docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentNotes.xhtml index 85a4c1f..1667a41 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Observer/addPaymentMethod.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Observer/addShipmentNotes.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Observer::addShipmentNotes @@ -41,7 +41,7 @@
    • FireGento_Pdf_Model_Observer
    • -
    • addPaymentMethod
    • +
    • addShipmentNotes
    -

    FireGento_Pdf_Model_Observer::addPaymentMethod

    -

    Add payment method to invoice notes.

    +

    FireGento_Pdf_Model_Observer::addShipmentNotes

    +

    Add notes to shipment document.

    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Shipment.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Shipment.xhtml index 55050f4..8eeb50e 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Shipment.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Shipment.xhtml @@ -46,6 +46,9 @@
  • Synopsis
  • +
  • + Hierarchy +
  • Members
  • @@ -53,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -63,24 +66,30 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Shipment - {
    • // members
    • private Mage_Sales_Model_Order_Pdf_Abstract $_engine; + extends Mage_Sales_Model_Order_Pdf_Shipment + {
      • // members
      • protected Mage_Sales_Model_Order_Pdf_Abstract $_engine;
      • // methods
      • protected Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Shipment getEngine()
      • public mixed getPdf()
      }
    +

    Hierarchy

    +
    +

    Extends

    +
      +
    • Mage_Sales_Model_Order_Pdf_Shipment
    • +
    +

    Members

    -

    private

    +

    protected

    Methods

    @@ -99,7 +108,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getEngine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getEngine.xhtml index 6576eff..b198ce5 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getEngine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getEngine.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Shipment::getEngine @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getPdf.xhtml index 1ae8b07..674c4fb 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Shipment/getPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Shipment::getPdf @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,8 +70,8 @@

      Signature

      - public function getPdf(array - $shipments ) + public function getPdf([array + $shipments = ] )

      Parameters

      @@ -89,7 +89,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xhtml index 0ceaf49..c1bbbea 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xhtml @@ -56,7 +56,7 @@ Methods
    • - Source + Source
    @@ -69,8 +69,9 @@

    Synopsis

    class FireGento_Pdf_Model_System_Config_Backend_Font - extends Mage_Adminhtml_Model_System_Config_Backend_File - {
    • // members
    • private array $_allowedExtensions; + extends Mage_Adminhtml_Model_System_Config_Backend_File + {
      @@ -79,14 +80,12 @@

      Extends

      Members

      -

      private

      +

      protected

      • $_allowedExtensions @@ -104,7 +103,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font/_getAllowedExtensions.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font/_getAllowedExtensions.xhtml index 437e04a..23b9d19 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font/_getAllowedExtensions.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Backend_Font/_getAllowedExtensions.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Backend_Font::_getAllowedExtensions @@ -56,7 +56,7 @@ Return
    • - Source + Source
    @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xhtml index 09e3f20..5fb9994 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine @@ -98,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine/toOptionArray.xhtml index 3303b8a..29a2fce 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xhtml new file mode 100644 index 0000000..5eab0d9 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xhtml @@ -0,0 +1,104 @@ + + + + + phpDox - FireGento_Pdf_Model_System_Config_Source_Customer_Number + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Model_System_Config_Source_Customer_Number

    +

    Customer number source model.

    +

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +
    • Copyright: 2015 FireGento Team (http://www.firegento.com)
    • +
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
    • +
    +

    Synopsis

    +
    class FireGento_Pdf_Model_System_Config_Source_Customer_Number + {
    • // constants
    • const CUSTOMER_NUMBER_FIELD_INCREMENT_ID = 'increment_id';
    + + }
    +

    Constants

    + + + + + + + + + + + + + +
    NameValue
    CUSTOMER_NUMBER_FIELD_INCREMENT_ID'increment_id'
    +

    Methods

    +
    +

    public

    + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number/toOptionArray.xhtml new file mode 100644 index 0000000..b7b0315 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number/toOptionArray.xhtml @@ -0,0 +1,84 @@ + + + + + phpDox - FireGento_Pdf_Model_System_Config_Source_Customer_Number::toOptionArray + + + + + +
    + + +
    +

    FireGento_Pdf_Model_System_Config_Source_Customer_Number::toOptionArray

    +

    Return array of possible positions.

    +

    +

      +

      Signature

      +
      + public function toOptionArray() + +
      +

      Returns

      +
      +
      array
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xhtml index 318741c..6d7cf51 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Headerblocks @@ -102,7 +100,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks/toOptionArray.xhtml index 9ba8145..e1e1aaf 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Headerblocks::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xhtml index 261b545..527ecdb 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Invoice_Engine @@ -98,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine/toOptionArray.xhtml index 17ce9f5..b78994c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Invoice_Engine::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xhtml index 7d638e4..d9be0a9 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Logo @@ -110,7 +108,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo/toOptionArray.xhtml index 8b7213c..a3a7568 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Logo/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Logo::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xhtml new file mode 100644 index 0000000..0831c29 --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xhtml @@ -0,0 +1,84 @@ + + + + + phpDox - FireGento_Pdf_Model_System_Config_Source_PageSize + + + + + +
    +
    + +
    + +
    +

    \FireGento_Pdf_Model_System_Config_Source_PageSize

    +

    Page size source model.

    +

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +
    +

    Synopsis

    +
    class FireGento_Pdf_Model_System_Config_Source_PageSize + {
    + + }
    +

    Methods

    +
    +

    public

    + +
    +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize/toOptionArray.xhtml new file mode 100644 index 0000000..da7dddd --- /dev/null +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_PageSize/toOptionArray.xhtml @@ -0,0 +1,84 @@ + + + + + phpDox - FireGento_Pdf_Model_System_Config_Source_PageSize::toOptionArray + + + + + +
    + + +
    +

    FireGento_Pdf_Model_System_Config_Source_PageSize::toOptionArray

    +

    Return array of possible sizes.

    +

    +

      +

      Signature

      +
      + public function toOptionArray() + +
      +

      Returns

      +
      +
      array
      +
      +
      +
    +
    +
    + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors +
    + + diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xhtml index ec55eb2..b067452 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Payment @@ -102,7 +100,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment/toOptionArray.xhtml index 84c68a3..c1258b8 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Payment/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Payment::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xhtml index bb912cd..194c35a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Shipment_Engine @@ -98,7 +96,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine/toOptionArray.xhtml index 8721005..a63fe4d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Shipment_Engine::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xhtml index 80ccf13..1386697 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xhtml @@ -53,7 +53,7 @@ Methods
  • - Source + Source
  • @@ -63,8 +63,6 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_System_Config_Source_Shipping @@ -102,7 +100,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping/toOptionArray.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping/toOptionArray.xhtml index fdb0cd4..59735f6 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping/toOptionArray.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_System_Config_Source_Shipping/toOptionArray.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_System_Config_Source_Shipping::toOptionArray @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xhtml index 9b22039..5787751 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xhtml @@ -56,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -66,12 +66,10 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal - extends Mage_Tax_Model_Sales_Pdf_Grandtotal + extends Mage_Tax_Model_Sales_Pdf_Grandtotal {
    • // constants
    • const NO_SUM_ON_DETAILS = 'tax/sales_display/no_sum_on_details';
    • const HIDE_GRANDTOTAL_EXCL_TAX = 'tax/sales_display/hide_grandtotal_excl_tax';
    @@ -80,9 +78,7 @@

    Extends

    Constants

    @@ -115,7 +111,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal/getTotalsForDisplay.xhtml b/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal/getTotalsForDisplay.xhtml index 2bdccb7..289e65d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal/getTotalsForDisplay.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal/getTotalsForDisplay.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal::getTotalsForDisplay @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -78,7 +78,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController.xhtml b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController.xhtml index da6e875..6b23e77 100644 --- a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController.xhtml @@ -56,7 +56,7 @@ Methods
  • - Source + Source
  • @@ -66,13 +66,12 @@

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class FireGento_Pdf_Sales_OrderController - extends Mage_Sales_OrderController - {
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printCreditmemoAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printCreditmemoAction.xhtml index 5219d36..c6a938f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printCreditmemoAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printCreditmemoAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Sales_OrderController::printCreditmemoAction @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printDocument.xhtml b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printDocument.xhtml index 494c6eb..29f9126 100644 --- a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printDocument.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printDocument.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Sales_OrderController::printDocument @@ -56,7 +56,7 @@ Parameter
  • - Source + Source
  • @@ -81,7 +81,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printInvoiceAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printInvoiceAction.xhtml index 759e9c8..62f6e1a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printInvoiceAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printInvoiceAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Sales_OrderController::printInvoiceAction @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printShipmentAction.xhtml b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printShipmentAction.xhtml index 2f87b29..2c96a5d 100644 --- a/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printShipmentAction.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Sales_OrderController/printShipmentAction.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Sales_OrderController::printShipmentAction @@ -56,7 +56,7 @@ Return
  • - Source + Source
  • @@ -79,7 +79,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xhtml index 137cf2f..301edca 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xhtml @@ -56,19 +56,23 @@ Methods
  • - Source + Source
  • \FireGento_Pdf_Test_Model_CreditmemoTest

    -

    +

    Test class for creditmemos.

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +

    Synopsis

    class FireGento_Pdf_Test_Model_CreditmemoTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract - {
    • // members
    • protected string $class; -
    @@ -97,11 +101,11 @@

    protected

      -
    • - $class +
    • + $_class
    • -
    • - $class +
    • + $_class
    @@ -157,7 +161,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getEngineXmlConfigPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getEngineXmlConfigPath.xhtml index 44b839d..92d6507 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getEngineXmlConfigPath.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getEngineXmlConfigPath.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_CreditmemoTest::getEngineXmlConfigPath @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getExpectedDefaultEngineClass.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getExpectedDefaultEngineClass.xhtml index 479ca30..a29a79c 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getExpectedDefaultEngineClass.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getExpectedDefaultEngineClass.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_CreditmemoTest::getExpectedDefaultEngineClass @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getOrderObjectClassName.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getOrderObjectClassName.xhtml index 8d9eaf1..242baae 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getOrderObjectClassName.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_CreditmemoTest/getOrderObjectClassName.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_CreditmemoTest::getOrderObjectClassName @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest.xhtml index c11a1b5..5484302 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest.xhtml @@ -56,19 +56,23 @@ Methods
  • - Source + Source
  • \FireGento_Pdf_Test_Model_InvoiceTest

    -

    +

    Test class for invoices.

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +

    Synopsis

    class FireGento_Pdf_Test_Model_InvoiceTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract - {
    • // members
    • protected string $class; -
    @@ -97,11 +101,11 @@

    protected

      -
    • - $class +
    • + $_class
    • -
    • - $class +
    • + $_class
    @@ -157,7 +161,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getEngineXmlConfigPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getEngineXmlConfigPath.xhtml index 487d5b3..36c894f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getEngineXmlConfigPath.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getEngineXmlConfigPath.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_InvoiceTest::getEngineXmlConfigPath @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getExpectedDefaultEngineClass.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getExpectedDefaultEngineClass.xhtml index 7f3e395..04f519a 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getExpectedDefaultEngineClass.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getExpectedDefaultEngineClass.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_InvoiceTest::getExpectedDefaultEngineClass @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getOrderObjectClassName.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getOrderObjectClassName.xhtml index a3e0463..836764b 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getOrderObjectClassName.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_InvoiceTest/getOrderObjectClassName.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_InvoiceTest::getOrderObjectClassName @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xhtml index 15ab290..1591586 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xhtml @@ -56,18 +56,22 @@ Methods
  • - Source + Source
  • \FireGento_Pdf_Test_Model_SalesObjectTestAbstract

    -

    +

    Abstract test class for the different engines.

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +

    Synopsis

    class FireGento_Pdf_Test_Model_SalesObjectTestAbstract - extends EcomDev_PHPUnit_Test_Case - {
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/callMethod.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/callMethod.xhtml index 993546d..baf6471 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/callMethod.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/callMethod.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::callMethod @@ -56,7 +56,7 @@ Parameter
  • - Source + Source
  • @@ -68,10 +68,10 @@
    protected function callMethod( $object, - [ - $method = null, + + $method, [array - $args = null]] ) + $args = NULL] )

    Parameters

    @@ -92,7 +92,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getEngineXmlConfigPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getEngineXmlConfigPath.xhtml index 8c05468..2c6c977 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getEngineXmlConfigPath.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getEngineXmlConfigPath.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::getEngineXmlConfigPath @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -69,7 +69,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getExpectedDefaultEngineClass.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getExpectedDefaultEngineClass.xhtml index 817a9ac..42e5b6f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getExpectedDefaultEngineClass.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getExpectedDefaultEngineClass.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::getExpectedDefaultEngineClass @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -69,7 +69,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getOrderObjectClassName.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getOrderObjectClassName.xhtml index c0898bd..bae3bc8 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getOrderObjectClassName.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/getOrderObjectClassName.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::getOrderObjectClassName @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -69,7 +69,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldExist.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldExist.xhtml index e8f77a9..72b9f0f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldExist.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldExist.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::itShouldExist @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldHaveAMethodGetEngine.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldHaveAMethodGetEngine.xhtml index f637ce0..19ff359 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldHaveAMethodGetEngine.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldHaveAMethodGetEngine.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::itShouldHaveAMethodGetEngine @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnADefaultEngineModel.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnADefaultEngineModel.xhtml index 6f11556..0d24082 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnADefaultEngineModel.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnADefaultEngineModel.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::itShouldReturnADefaultEngineModel @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnAZendPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnAZendPdf.xhtml index fc03967..a31d45f 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnAZendPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldReturnAZendPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::itShouldReturnAZendPdf @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldhaveAMethodGetPdf.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldhaveAMethodGetPdf.xhtml index 4c4a649..219ddfa 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldhaveAMethodGetPdf.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract/itShouldhaveAMethodGetPdf.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_SalesObjectTestAbstract::itShouldhaveAMethodGetPdf @@ -53,7 +53,7 @@ Synopsis
  • - Source + Source
  • @@ -70,7 +70,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest.xhtml index d547ea3..a685845 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest.xhtml @@ -56,19 +56,23 @@ Methods
  • - Source + Source
  • \FireGento_Pdf_Test_Model_ShipmentTest

    -

    +

    Test class for shipments.

    +

      +
    • Author: FireGento Team <team@firegento.com>
    • +

    Synopsis

    class FireGento_Pdf_Test_Model_ShipmentTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract - {
    • // members
    • protected string $class; -
    @@ -97,11 +101,11 @@

    protected

      -
    • - $class +
    • + $_class
    • -
    • - $class +
    • + $_class
    @@ -157,7 +161,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getEngineXmlConfigPath.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getEngineXmlConfigPath.xhtml index b1caf35..1fe6437 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getEngineXmlConfigPath.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getEngineXmlConfigPath.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_ShipmentTest::getEngineXmlConfigPath @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getExpectedDefaultEngineClass.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getExpectedDefaultEngineClass.xhtml index 5e0331b..e41b4cd 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getExpectedDefaultEngineClass.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getExpectedDefaultEngineClass.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_ShipmentTest::getExpectedDefaultEngineClass @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getOrderObjectClassName.xhtml b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getOrderObjectClassName.xhtml index a2c9fde..ffc9815 100644 --- a/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getOrderObjectClassName.xhtml +++ b/docs/api/html/classes/FireGento_Pdf_Test_Model_ShipmentTest/getOrderObjectClassName.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - FireGento_Pdf_Test_Model_ShipmentTest::getOrderObjectClassName @@ -56,7 +56,7 @@ Overrides
  • - Source + Source
  • @@ -80,7 +80,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xhtml b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xhtml index e0554d8..9ea9e4a 100644 --- a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xhtml +++ b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xhtml @@ -56,23 +56,22 @@ Methods
  • - Source + Source
  • \Firegento_Pdf_Block_Adminhtml_ColumnOrder

    -

    Firegento

    +

    Block which enables the user to change the column order in the admin via drag & drop.

    • Author: FireGento Team <team@firegento.com>
    • -
    • Copyright: 2013 FireGento Team (http://www.firegento.com)
    • -
    • License: http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)

    Synopsis

    class Firegento_Pdf_Block_Adminhtml_ColumnOrder - extends Mage_Adminhtml_Block_System_Config_Form_Field - {
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_addListItems.xhtml b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_addListItems.xhtml index 96459a8..86f391f 100644 --- a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_addListItems.xhtml +++ b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_addListItems.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - Firegento_Pdf_Block_Adminhtml_ColumnOrder::_addListItems @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -90,7 +90,7 @@
    - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    diff --git a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getElementHtml.xhtml b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getElementHtml.xhtml index 31b7bd7..cfb8a35 100644 --- a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getElementHtml.xhtml +++ b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getElementHtml.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - Firegento_Pdf_Block_Adminhtml_ColumnOrder::_getElementHtml @@ -59,7 +59,7 @@ Return
  • - Source + Source
  • @@ -70,7 +70,7 @@

      Signature

      - protected function _getElementHtml(Varien_Data_Form_Element_Abstract + protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element )
      @@ -78,7 +78,7 @@
      $element — - Varien_Data_Form_Element_Abstract
      + Varien_Data_Form_Element_Abstract
      form element to render


      Returns

      @@ -89,7 +89,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getSortableListHtml.xhtml b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getSortableListHtml.xhtml index 6d10810..82ded21 100644 --- a/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getSortableListHtml.xhtml +++ b/docs/api/html/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder/_getSortableListHtml.xhtml @@ -1,8 +1,8 @@ - + - phpDox - Test Method + phpDox - Firegento_Pdf_Block_Adminhtml_ColumnOrder::_getSortableListHtml @@ -59,7 +59,7 @@ Return
    • - Source + Source
    @@ -70,7 +70,7 @@

      Signature

      - protected function _getSortableListHtml(Varien_Data_Form_Element_Abstract + protected function _getSortableListHtml(Varien_Data_Form_Element_Abstract $element )
      @@ -78,7 +78,7 @@
      $element — - Varien_Data_Form_Element_Abstract
      + Varien_Data_Form_Element_Abstract
      form element to render


      Returns

      @@ -89,7 +89,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/css/source.css b/docs/api/html/css/source.css index 12316de..3628eab 100644 --- a/docs/api/html/css/source.css +++ b/docs/api/html/css/source.css @@ -142,3 +142,43 @@ table.source td.line div:target pre { .T_CONSTANT_ENCAPSED_STRING, .T_ENCAPSED_AND_WHITESPACE { color: #DD0000; } + +.covered { + background-color: rgba(5, 238, 25, 0.13); +} + +a.covered:hover + div { + left:90px; +} + +.coverage_details { + position: absolute; + left:-10000px; + margin:-1.4em 0 0 0; + background-color: #eee; + box-shadow: 5px 5px 10px #888; + z-index: 1; + padding:1em; +} + +.coverage_details span { + font-weight: bold; +} + +.coverage_details ul { + margin:0; + padding:1em; +} + +.coverage_details:before { + position: absolute; + content:""; + width: 12px; + height: 12px; + top: 3px; + left: -6px; + border:0; + background-color: #eee; + transform: rotate(45deg); + z-index: -1; +} diff --git a/docs/api/html/css/style.css b/docs/api/html/css/style.css index 968b13f..67913a4 100644 --- a/docs/api/html/css/style.css +++ b/docs/api/html/css/style.css @@ -111,6 +111,14 @@ h3 { min-height: 14em; } +.styled #index { + background: rgba(0, 0, 0, 0) none repeat scroll 0 0; + color: #000; + margin: 0; + min-height: 0; + padding: 0; +} + #index h1 { text-shadow: 0px -1px 0 #555555; } @@ -163,6 +171,25 @@ h3 { text-align: right; } +.nummeric a { + display: block; + background-color: #CCD; + padding: 0 0.5em; +} + +.nummeric a:hover, .nummeric a:focus, .nummeric a:active { + background-color: #DDE; + outline: dotted 2px #AAB; +} + +.nummeric a:hover { + outline-style: solid; +} + +.nummeric a:active { + outline: solid 2px #667; +} + .percent { text-align: right; width:5em; diff --git a/docs/api/html/index.xhtml b/docs/api/html/index.xhtml index ad632d6..9bb7cf2 100644 --- a/docs/api/html/index.xhtml +++ b/docs/api/html/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -34,13 +34,13 @@

      Build

      -

      +

      Mon, 12 Mar 2018 20:13:38 +0000

      VCS Info

      tag:
      branch:

      Used Enrichers

      -

      +

      build

      @@ -49,7 +49,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/interfaces.xhtml b/docs/api/html/interfaces.xhtml index 6335feb..628bc0e 100644 --- a/docs/api/html/interfaces.xhtml +++ b/docs/api/html/interfaces.xhtml @@ -29,7 +29,7 @@

      Interfaces

      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/namespaces.xhtml b/docs/api/html/namespaces.xhtml index 6a02c1c..a67e370 100644 --- a/docs/api/html/namespaces.xhtml +++ b/docs/api/html/namespaces.xhtml @@ -43,7 +43,7 @@ \ 0 - 33 + 44 0 @@ -51,7 +51,7 @@
      - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xhtml index badce8b..75f0340 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of ColumnOrder.php

      Source of file ColumnOrder.php

      - Size: 6,438 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

      /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php

      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
      <?php
      /**
       * This file is part of a FireGento e.V. module.
       *
       * This FireGento e.V. module is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License version 3 as
       * published by the Free Software Foundation.
       *
       * This script is distributed in the hope that it will be useful, but WITHOUT
       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
       *
       * PHP version 5
       *
       * @category  FireGento
       * @package   FireGento_Pdf
       * @author    FireGento Team <team@firegento.com>
       * @copyright 2013 FireGento Team (http://www.firegento.com)
       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
       */
      /**
       * Firegento
       *
       * @category  FireGento
       * @package   FireGento_Pdf
       * @author    FireGento Team <team@firegento.com>
       * @copyright 2013 FireGento Team (http://www.firegento.com)
       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
       */
      class Firegento_Pdf_Block_Adminhtml_ColumnOrder
          extends Mage_Adminhtml_Block_System_Config_Form_Field
      {
          protected $_sortableListHtml = '';

          /**
           * generate html for orderable list
           *
           * @param  Varien_Data_Form_Element_Abstract $element form element to render
           *
           * @return string
           */
          protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
          {
              return '
                  <style>.orderable_config li {list-style: disc inside; cursor:move;}</style>
                  <p>' . $this->__('Define the order by moving the following items using your mouse:') . '<p>
                  <ul id="' . $element->getHtmlId() . '_list" class="orderable_config">
                  ' . $this->_getSortableListHtml($element) . '
                  </ul>
                  <input type="hidden" value="' . $element->getValue() . '" name="' . $element->getName() .
                      '" id="' . $element->getHtmlId() . '">
                  <script type="text/javascript">
                      Sortable.create("' . $element->getHtmlId() . '_list", {
                          onUpdate: function() {
                              var inheritCheckbox = $("' . $element->getHtmlId() . '_inherit");
                              if (inheritCheckbox) {
                                  inheritCheckbox.checked=false;
                              }
                              var newOrder="";
                              $A(this.element.children).each(function(item){
                                  var current = $(item).attributes["data-column"].value;
                                  if ("disabled" == current) {
                                      $("' . $element->getHtmlId() . '").value = newOrder;
                                  } else {
                                      if (0 < newOrder.length) {
                                          newOrder+=",";
                                      }
                                      newOrder+=current;
                                  }
                              });
                              validateSortableWidth();
                          }
                      });
                      validateSortableWidth = function () {
                          var newWidth=0;
                          $A($("' . $element->getHtmlId() . '_list").children).each(function(item){
                              var current = $(item).attributes["data-column"].value;
                              if ($(item.attributes["data-width"])) {
                                  newWidth += parseInt($(item).attributes["data-width"].value);
                              } else if ("disabled" == current) {
                                  if (240 < newWidth) {
                                      $("' . $element->getHtmlId() . '_warning").innerHTML = "'
                                      . $this->__('Caution: Your columns may overlap!') . '";
                                      $("' . $element->getHtmlId() . '_warning").show();
                                  } else {
                                      $("' . $element->getHtmlId() . '_warning").hide();
                                  }
                              }
                          });
                      };
                      validateSortableWidth();
                  </script>
              ';
          }

          /**
           * get html for list
           *
           * @param  Varien_Data_Form_Element_Abstract $element form element to render
           *
           * @return string
           */
          protected function _getSortableListHtml(Varien_Data_Form_Element_Abstract $element)
          {
              $availableItems = array(
                  'price_incl_tax'    => array('width' => 60, 'label' => $this->__('Price (incl. tax)')),
                  'price'             => array('width' => 60, 'label' => $this->__('Price')),
                  'qty'               => array('width' => 40, 'label' => $this->__('Qty')),
                  'subtotal_incl_tax' => array('width' => 70, 'label' => $this->__('Subtotal (incl. tax)')),
                  'subtotal'          => array('width' => 50, 'label' => $this->__('Subtotal')),
                  'tax'               => array('width' => 50, 'label' => $this->__('Tax amount')),
                  'tax_rate'          => array('width' => 50, 'label' => $this->__('Tax rate')),
              );
              $activeItems = array();
              foreach (explode(',', $element->getValue()) as $item) {
                  $item = trim($item);
                  if (array_key_exists($item, $availableItems)) {
                      $activeItems[$item] = $availableItems[$item];
                      unset($availableItems[$item]);
                  }
              }

              $this->_addListItems($activeItems);
              $this->_sortableListHtml .= '<li id="pdf-column-disabled" data-column="disabled" style="list-style:none">
                  <div id="' . $element->getHtmlId() . '_warning" style="display:none" class="validation-advice"></div>
                  <br />
                  ' . $this->__('not to be listed') . '
                  </li>';
              $this->_addListItems($availableItems);

              return $this->_sortableListHtml;
          }

          /**
           * add items to list
           *
           * @param  array $items items to add
           *
           * @return $this
           */
          protected function _addListItems($items)
          {
              foreach ($items as $name=>$item) {
                  $this->_sortableListHtml .= sprintf(
                      '<li id="pdf-column-%s" data-column="%s" data-width="%s">%s</li>',
                      $name,
                      $name,
                      $item['width'],
                      $item['label']
                  );
              }
              return $this;
          }
      }

      + Size: 6,355 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php

      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
      <?php
      /**
       * This file is part of a FireGento e.V. module.
       *
       * This FireGento e.V. module is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License version 3 as
       * published by the Free Software Foundation.
       *
       * This script is distributed in the hope that it will be useful, but WITHOUT
       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
       *
       * PHP version 5
       *
       * @category  FireGento
       * @package   FireGento_Pdf
       * @author    FireGento Team <team@firegento.com>
       * @copyright 2014 FireGento Team (http://www.firegento.com)
       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
       */
      /**
       * Block which enables the user to change the column order in the admin via drag & drop.
       *
       * @category  FireGento
       * @package   FireGento_Pdf
       * @author    FireGento Team <team@firegento.com>
       */
      class Firegento_Pdf_Block_Adminhtml_ColumnOrder
          extends Mage_Adminhtml_Block_System_Config_Form_Field
      {
          protected $_sortableListHtml = '';

          /**
           * generate html for orderable list
           *
           * @param  Varien_Data_Form_Element_Abstract $element form element to render
           *
           * @return string
           */
          protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
          {
              return '
                  <style>.orderable_config li {list-style: disc inside; cursor:move;}</style>
                  <p>' . $this->__('Define the order by moving the following items using your mouse:') . '<p>
                  <ul id="' . $element->getHtmlId() . '_list" class="orderable_config">
                  ' . $this->_getSortableListHtml($element) . '
                  </ul>
                  <input type="hidden" value="' . $element->getValue() . '" name="' . $element->getName() .
                      '" id="' . $element->getHtmlId() . '">
                  <script type="text/javascript">
                      Sortable.create("' . $element->getHtmlId() . '_list", {
                          onUpdate: function() {
                              var inheritCheckbox = $("' . $element->getHtmlId() . '_inherit");
                              if (inheritCheckbox) {
                                  inheritCheckbox.checked=false;
                              }
                              var newOrder="";
                              $A(this.element.children).each(function(item){
                                  var current = $(item).attributes["data-column"].value;
                                  if ("disabled" == current) {
                                      $("' . $element->getHtmlId() . '").value = newOrder;
                                  } else {
                                      if (0 < newOrder.length) {
                                          newOrder+=",";
                                      }
                                      newOrder+=current;
                                  }
                              });
                              validateSortableWidth();
                          }
                      });
                      validateSortableWidth = function () {
                          var newWidth=0;
                          $A($("' . $element->getHtmlId() . '_list").children).each(function(item){
                              var current = $(item).attributes["data-column"].value;
                              if ($(item.attributes["data-width"])) {
                                  newWidth += parseInt($(item).attributes["data-width"].value);
                              } else if ("disabled" == current) {
                                  if (240 < newWidth) {
                                      $("' . $element->getHtmlId() . '_warning").innerHTML = "'
                                      . $this->__('Caution: Your columns may overlap!') . '";
                                      $("' . $element->getHtmlId() . '_warning").show();
                                  } else {
                                      $("' . $element->getHtmlId() . '_warning").hide();
                                  }
                              }
                          });
                      };
                      validateSortableWidth();
                  </script>
              ';
          }

          /**
           * get html for list
           *
           * @param  Varien_Data_Form_Element_Abstract $element form element to render
           *
           * @return string
           */
          protected function _getSortableListHtml(Varien_Data_Form_Element_Abstract $element)
          {
              $availableItems = array(
                  'price_incl_tax'    => array('width' => 60, 'label' => $this->__('Price (incl. tax)')),
                  'price'             => array('width' => 60, 'label' => $this->__('Price')),
                  'qty'               => array('width' => 40, 'label' => $this->__('Qty')),
                  'subtotal_incl_tax' => array('width' => 70, 'label' => $this->__('Subtotal (incl. tax)')),
                  'subtotal'          => array('width' => 50, 'label' => $this->__('Subtotal')),
                  'tax'               => array('width' => 50, 'label' => $this->__('Tax amount')),
                  'tax_rate'          => array('width' => 50, 'label' => $this->__('Tax rate')),
              );
              $activeItems = array();
              foreach (explode(',', $element->getValue()) as $item) {
                  $item = trim($item);
                  if (array_key_exists($item, $availableItems)) {
                      $activeItems[$item] = $availableItems[$item];
                      unset($availableItems[$item]);
                  }
              }

              $this->_addListItems($activeItems);
              $this->_sortableListHtml .= '<li id="pdf_column-disabled" data-column="disabled" style="list-style:none">
                  <div id="' . $element->getHtmlId() . '_warning" style="display:none" class="validation-advice"></div>
                  <br />
                  ' . $this->__('not to be listed') . '
                  </li>';
              $this->_addListItems($availableItems);

              return $this->_sortableListHtml;
          }

          /**
           * add items to list
           *
           * @param  array $items items to add
           *
           * @return $this
           */
          protected function _addListItems($items)
          {
              foreach ($items as $name=>$item) {
                  $this->_sortableListHtml .= sprintf(
                      '<li id="pdf_column-%s" data-column="%s" data-width="%s">%s</li>',
                      $name,
                      $name,
                      $item['width'],
                      $item['label']
                  );
              }

              return $this;
          }
      }

      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xhtml new file mode 100644 index 0000000..336e0af --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Notes.php

      Source of file Notes.php

      + Size: 1,757 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php

      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
      <?php

      class FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes
          extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
      {

          /**
           * @var FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country
           */
          protected $_countryRenderer;

          /**
           * Retrieve country column renderer
           *
           * @return FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country
           */
          protected function _getCountryRenderer()
          {
              if (!$this->_countryRenderer) {
                  $this->_countryRenderer = $this->getLayout()->createBlock(
                      'firegento_pdf/adminhtml_system_config_form_field_notes_country', '',
                      array('is_render_to_js_template' => true)
                  );
              }

              return $this->_countryRenderer;
          }

          /**
           * Add columns, change button labels etc.
           */
          protected function _prepareToRender()
          {
              $this->addColumn(
                  'country', array(
                      'label'    => Mage::helper('firegento_pdf')->__('Shipping Country'),
                      'renderer' => $this->_getCountryRenderer()
                  )
              );
              $this->addColumn(
                  'note', array(
                      'label' => Mage::helper('firegento_pdf')->__('Note')
                  )
              );
              $this->_addButtonLabel = Mage::helper('firegento_pdf')->__('Add Note');
              $this->_addAfter       = false;
          }

          /**
           * Prepare existing row data object
           *
           * @param Varien_Object
           */
          protected function _prepareArrayRow(Varien_Object $row)
          {
              $row->setData(
                  'option_extra_attr_' . $this->_getCountryRenderer()->calcOptionHash($row->getData('country')),
                  'selected="selected"'
              );
          }

      }

      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xhtml new file mode 100644 index 0000000..a4b2c5f --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Country.php

      Source of file Country.php

      + Size: 0,776 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php

      1234567891011121314151617181920212223242526272829303132333435363738
      <?php

      /**
       * HTML select element block with country options
       */
      class FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country
          extends Mage_Core_Block_Html_Select
      {

          /**
           * @param $value
           *
           * @return mixed
           */
          public function setInputName($value)
          {
              return $this->setName($value);
          }

          /**
           * Render block HTML
           *
           * @return string
           */
          public function _toHtml()
          {
              if (!$this->getOptions()) {
                  $countryModel = Mage::getModel('adminhtml/system_config_source_country');
                  foreach ($countryModel->toOptionArray() as $country) {
                      $this->addOption($country['value'], $country['label']);
                  }
              }

              return parent::_toHtml();
          }

      }

      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/index.xhtml new file mode 100644 index 0000000..b95efa6 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/index.xhtml @@ -0,0 +1,144 @@ + + + + + phpDox - Overview + + + + + +
      +
      + +
      +

      Source of FireGento_Pdf

      +

      + This project consists of 43 directories, containing + a total of 45 files. +

      + + + + + + + + + + + + + + + +
      NameSizeLast Modified
      + Country.php + 776 Bytes + 2018-03-12T19:59:19+00:00
      + + Total: 1 files +
      +
      +
      + +
      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/index.xhtml new file mode 100644 index 0000000..9f80d03 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/index.xhtml @@ -0,0 +1,147 @@ + + + + + phpDox - Overview + + + + + +
      +
      + +
      +

      Source of FireGento_Pdf

      +

      + This project consists of 43 directories, containing + a total of 45 files. +

      + + + + + + + + + + + + + + + + + + + + +
      NameSizeLast Modified
      + + Notes + +   
      + Notes.php + 1.7 KB + 2018-03-12T19:59:19+00:00
      + + Total: 1 directories,1 files +
      +
      +
      + +
      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/index.xhtml new file mode 100644 index 0000000..0587023 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/index.xhtml @@ -0,0 +1,133 @@ + + + + + phpDox - Overview + + + + + +
      +
      + +
      +

      Source of FireGento_Pdf

      +

      + This project consists of 43 directories, containing + a total of 45 files. +

      + + + + + + + + + + + + + + + +
      NameSizeLast Modified
      + + Field + +   
      + + Total: 1 directories, +
      +
      +
      + +
      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/index.xhtml new file mode 100644 index 0000000..f6be4ec --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/index.xhtml @@ -0,0 +1,127 @@ + + + + + phpDox - Overview + + + + + +
      +
      + +
      +

      Source of FireGento_Pdf

      +

      + This project consists of 43 directories, containing + a total of 45 files. +

      + + + + + + + + + + + + + + + +
      NameSizeLast Modified
      + + Form + +   
      + + Total: 1 directories, +
      +
      +
      + +
      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/index.xhtml new file mode 100644 index 0000000..db1e03f --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/System/index.xhtml @@ -0,0 +1,121 @@ + + + + + phpDox - Overview + + + + + +
      +
      + +
      +

      Source of FireGento_Pdf

      +

      + This project consists of 43 directories, containing + a total of 45 files. +

      + + + + + + + + + + + + + + + +
      NameSizeLast Modified
      + + Config + +   
      + + Total: 1 directories, +
      +
      +
      + +
      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/index.xhtml index a2e1ace..ab9de83 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/Adminhtml/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

      Source of FireGento_Pdf

      - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

      • @@ -95,14 +95,23 @@ ColumnOrder.php - 6.3 KB + 6.2 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 + + + + + System + + +   +   - Total: 1 files + Total: 1 directories,1 files diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/index.xhtml index 0e74724..f73d472 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Block/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Block/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

        Source of FireGento_Pdf

        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

        • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Data.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Data.php.xhtml index cd53011..27708f5 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Data.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Data.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Data.php

          Source of file Data.php

          - Size: 10,520 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

          /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Helper/Data.php

          123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
          <?php
          /**
           * This file is part of the FIREGENTO project.
           *
           * FireGento_Pdf is free software; you can redistribute it and/or
           * modify it under the terms of the GNU General Public License version 3 as
           * published by the Free Software Foundation.
           *
           * This script is distributed in the hope that it will be useful, but WITHOUT
           * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
           * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
           *
           * PHP version 5
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           * @copyright 2013 FireGento Team (http://www.firegento.com)
           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
           * @version   $Id:$
           * @since     0.1.0
           */

          /**
           * Dummy data helper for translation issues.
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           * @copyright 2013 FireGento Team (http://www.firegento.com)
           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
           * @version   $Id:$
           * @since     0.1.0
           */
          class FireGento_Pdf_Helper_Data extends Mage_Core_Helper_Abstract
          {
              const XML_PATH_FIREGENTO_PDF_LOGO_POSITION = 'sales_pdf/firegento_pdf/logo_position';
              const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER = 'sales_pdf/invoice/show_customer_number';
              const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER = 'sales_pdf/shipment/show_customer_number';
              const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/show_customer_number';
              const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN = 'sales_pdf/invoice/filename_export_pattern';
              const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN = 'sales_pdf/shipment/filename_export_pattern';
              const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN = 'sales_pdf/creditmemo/filename_export_pattern';

              const XML_PATH_REGULAR_FONT = 'sales_pdf/firegento_pdf_fonts/regular_font';
              const XML_PATH_BOLD_FONT = 'sales_pdf/firegento_pdf_fonts/bold_font';
              const XML_PATH_ITALIC_FONT = 'sales_pdf/firegento_pdf_fonts/italic_font';

              const FONT_PATH_IN_MEDIA = '/firegento_pdf/fonts';

              /**
               * Return the order id or false if order id should not be displayed on document.
               *
               * @param  Mage_Sales_Model_Order $order order to get id from
               * @param  string                 $mode  differ between creditmemo, invoice, etc.
               *
               * @return mixed
               */
              public function putOrderId(Mage_Sales_Model_Order $order, $mode = 'invoice')
              {
                  switch ($mode) {
                      case 'invoice':
                          $putOrderIdOnInvoice = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnInvoice) {
                              return $order->getRealOrderId();
                          }
                          break;

                      case 'shipment':
                          $putOrderIdOnShipment = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_SHIPMENT_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnShipment) {
                              return $order->getRealOrderId();
                          }
                          break;

                      case 'creditmemo':
                          $putOrderIdOnCreditmemo = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_CREDITMEMO_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnCreditmemo) {
                              return $order->getRealOrderId();
                          }
                          break;
                  }
                  return false;
              }

              /**
               * Whether the logo should be shown in full width.
               *
               * @param  mixed $store store to get information from
               *
               * @return bool whether the logo should be shown in full width
               */
              public function isLogoFullWidth($store)
              {
                  $configSetting = Mage::getStoreConfig(
                      self::XML_PATH_FIREGENTO_PDF_LOGO_POSITION, $store
                  );
                  $fullWidth = FireGento_Pdf_Model_System_Config_Source_Logo::FULL_WIDTH;
                  return $configSetting == $fullWidth;
              }

              /**
               * Whether the customer number should be shown.
               *
               * @param  string $mode  the mode of this document like invoice, shipment or creditmemo
               * @param  mixed  $store store to get information from
               *
               * @return bool whether the customer number should be shown
               */
              public function showCustomerNumber($mode = 'invoice', $store)
              {
                  switch ($mode) {
                      case 'invoice':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                      case 'shipment':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                  }
                  return true; // backwards compatibility
              }

              /**
               * Return scaled image sizes based on an path to an image file.
               *
               * @param  string $image     Url to image file.
               * @param  int    $maxWidth  max width the image can have
               * @param  int    $maxHeight max height the image can have
               *
               * @return array  with 2 elements - width and height.
               */
              public function getScaledImageSize($image, $maxWidth, $maxHeight)
              {
                  list($width, $height) = getimagesize($image);

                  if ($height > $maxHeight or $width > $maxWidth) {
                      // Calculate max variance to match dimensions.
                      $widthVar = $width / $maxWidth;
                      $heightVar = $height / $maxHeight;

                      // Calculate scale factor to match dimensions.
                      if ($widthVar > $heightVar) {
                          $scale = $maxWidth / $width;
                      } else {
                          $scale = $maxHeight / $height;
                      }

                      // Calculate new dimensions.
                      $height = round($height * $scale);
                      $width = round($width * $scale);
                  }

                  return array($width, $height);
              }

              /**
               * Return export pattern config value
               *
               * @param  string $type the type of this document like invoice, shipment or creditmemo
               *
               * @return string
               */
              public function getExportPattern($type)
              {
                  switch ($type) {
                      case 'invoice':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN
                          );
                      case 'shipment':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN
                          );
                  }
                  return true;
              }

              /**
               * Gets the variables which can be used as a placeholder in the filename.
               *
               * @param  Mage_Core_Model_Abstract $model the model instance
               *
               * @return array with the variables which can be use as placeholders in the filename
               */
              public function getModelVars($model)
              {
                  if (!$model instanceof Mage_Sales_Model_Order) {
                      switch ($model) {
                          case $model instanceof Mage_Sales_Model_Order_Invoice:
                              $specificVars = array(
                                  '{{invoice_id}}' => $model->getIncrementId()
                              );
                              break;
                          case $model instanceof Mage_Sales_Model_Order_Shipment:
                              $specificVars = array(
                                  '{{shipment_id}}' => $model->getIncrementId()
                              );
                              break;
                          case $model instanceof Mage_Sales_Model_Order_Creditmemo:
                              $specificVars = array(
                                  '{{creditmemo_id}}' => $model->getIncrementId()
                              );
                      }
                      $order = $model->getOrder();
                      $commonVars = array(
                          '{{order_id}}'           => $order->getIncrementId(),
                          '{{customer_id}}'        => $order->getCustomerId(),
                          '{{customer_name}}'      => $order->getCustomerName(),
                          '{{customer_firstname}}' => $order->getCustomerFirstname(),
                          '{{customer_lastname}}'  => $order->getCustomerLastname()
                      );
                      return array_merge($specificVars, $commonVars);
                  } else {
                      return array(
                          '{{order_id}}'           => $model->getIncrementId(),
                          '{{customer_id}}'        => $model->getCustomerId(),
                          '{{customer_name}}'      => $model->getCustomerName(),
                          '{{customer_firstname}}' => $model->getCustomerFirstname(),
                          '{{customer_lastname}}'  => $model->getCustomerLastname()
                      );
                  }
              }

              /**
               * The filename of the exported file.
               *
               * @param  string                   $type  the type of this document like invoice, shipment or creditmemo
               * @param  Mage_Core_Model_Abstract $model the model instance
               *
               * @return string the filename of the exported file
               */
              public function getExportFilename($type, $model)
              {
                  $type = (!$type) ? 'invoice' : $type;
                  $pattern = $this->getExportPattern($type);
                  if (!$pattern) {
                      $date = Mage::getSingleton('core/date');
                      $pattern = $type . $date->date('Y-m-d_H-i-s');
                  }
                  if (substr($pattern, -4) != '.pdf') {
                      $pattern = $pattern . '.pdf';
                  }

                  $path = strftime($pattern, strtotime($model->getCreatedAt()));
                  $vars = $this->getModelVars($model);

                  return strtr($path, $vars);
              }

              /**
               * Returns the path where the fonts reside.
               *
               * @return string the path where the fonts reside
               */
              public function getFontPath()
              {
                  return Mage::getBaseDir('media') . self::FONT_PATH_IN_MEDIA;
              }
          }

          + Size: 17,424 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

          /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Helper/Data.php

          123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
          <?php
          /**
           * This file is part of a FireGento e.V. module.
           *
           * This FireGento e.V. module is free software; you can redistribute it and/or
           * modify it under the terms of the GNU General Public License version 3 as
           * published by the Free Software Foundation.
           *
           * This script is distributed in the hope that it will be useful, but WITHOUT
           * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
           * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
           *
           * PHP version 5
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           * @copyright 2014 FireGento Team (http://www.firegento.com)
           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
           */

          /**
           * Dummy data helper for translation issues.
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           */
          class FireGento_Pdf_Helper_Data extends Mage_Core_Helper_Abstract
          {
              const XML_PATH_FIREGENTO_PDF_LOGO_POSITION = 'sales_pdf/firegento_pdf/logo_position';
              const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER = 'sales_pdf/invoice/show_customer_number';
              const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER = 'sales_pdf/shipment/show_customer_number';
              const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/show_customer_number';
              const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/invoice/show_customer_vatnumber';
              const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/shipment/show_customer_vatnumber';
              const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/creditmemo/show_customer_vatnumber';
              const XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/invoice/guestorder_customer_number';
              const XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/shipment/guestorder_customer_number';
              const XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/guestorder_customer_number';
              const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN = 'sales_pdf/invoice/filename_export_pattern';
              const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN = 'sales_pdf/shipment/filename_export_pattern';
              const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN = 'sales_pdf/creditmemo/filename_export_pattern';
              const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/invoice/filename_export_pattern_for_multiple_documents';
              const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/shipment/filename_export_pattern_for_multiple_documents';
              const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/creditmemo/filename_export_pattern_for_multiple_documents';
              const XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE = 'sales_pdf/firegento_pdf/page_size';

              const XML_PATH_COLOR_TEXT         = 'sales_pdf/firegento_pdf_colors/text';
              const XML_PATH_COLOR_LABELS       = 'sales_pdf/firegento_pdf_colors/labels';
              const XML_PATH_COLOR_TABLE_HEADER = 'sales_pdf/firegento_pdf_colors/table_header';
              const XML_PATH_COLOR_FOOTER       = 'sales_pdf/firegento_pdf_colors/footer';

              const XML_PATH_REGULAR_FONT = 'sales_pdf/firegento_pdf_fonts/regular_font';
              const XML_PATH_BOLD_FONT = 'sales_pdf/firegento_pdf_fonts/bold_font';
              const XML_PATH_ITALIC_FONT = 'sales_pdf/firegento_pdf_fonts/italic_font';

              const FONT_PATH_IN_MEDIA = '/firegento_pdf/fonts';

              /**
               * Return the order id or false if order id should not be displayed on document.
               *
               * @param  Mage_Sales_Model_Order $order order to get id from
               * @param  string                 $mode  differ between creditmemo, invoice, etc.
               *
               * @return mixed
               */
              public function putOrderId(Mage_Sales_Model_Order $order, $mode = 'invoice')
              {
                  switch ($mode) {
                      case 'invoice':
                          $putOrderIdOnInvoice = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnInvoice) {
                              return $order->getRealOrderId();
                          }
                          break;

                      case 'shipment':
                          $putOrderIdOnShipment = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_SHIPMENT_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnShipment) {
                              return $order->getRealOrderId();
                          }
                          break;

                      case 'creditmemo':
                          $putOrderIdOnCreditmemo = Mage::getStoreConfigFlag(
                              Mage_Sales_Model_Order_Pdf_Abstract::XML_PATH_SALES_PDF_CREDITMEMO_PUT_ORDER_ID,
                              $order->getStoreId()
                          );
                          if ($putOrderIdOnCreditmemo) {
                              return $order->getRealOrderId();
                          }
                          break;
                  }

                  return false;
              }

              /**
               * Whether the logo should be shown in full width.
               *
               * @param  mixed $store store to get information from
               *
               * @return bool whether the logo should be shown in full width
               */
              public function isLogoFullWidth($store)
              {
                  $configSetting = Mage::getStoreConfig(
                      self::XML_PATH_FIREGENTO_PDF_LOGO_POSITION, $store
                  );
                  $fullWidth = FireGento_Pdf_Model_System_Config_Source_Logo::FULL_WIDTH;

                  return $configSetting == $fullWidth;
              }

              /**
               * Whether the customer number should be shown.
               *
               * @param  string $mode  the mode of this document like invoice, shipment or creditmemo
               * @param  mixed  $store store to get information from
               *
               * @return bool whether the customer number should be shown
               */
              public function showCustomerNumber($mode = 'invoice', $store = null)
              {
                  switch ($mode) {
                      case 'invoice':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                      case 'shipment':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER,
                              $store
                          );
                  }

                  return true; // backwards compatibility
              }

              /**
               * Whether the customer VAT number should be shown.
               *
               * @param  string $mode  the mode of this document like invoice, shipment or creditmemo
               * @param  mixed  $store store to get information from
               *
               * @return bool whether the customer number should be shown
               */
              public function showCustomerVATNumber($mode = 'invoice', $store = null)
              {
                  switch ($mode) {
                      case 'invoice':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER,
                              $store
                          );
                      case 'shipment':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER,
                              $store
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfigFlag(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER,
                              $store
                          );
                  }

                  return true; // backwards compatibility
              }

              /**
               * Get customer number for guest orders.
               *
               * @param  string $mode  the mode of this document like invoice, shipment or creditmemo
               * @param  mixed  $store store to get information from
               *
               * @return string customer number for guest orders
               */
              public function getGuestorderCustomerNo($mode = 'invoice', $store = null)
              {
                  switch ($mode) {
                      case 'invoice':
                          return trim(
                              Mage::getStoreConfigFlag(
                                  self::XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER,
                                  $store
                              )
                          );
                      case 'shipment':
                          return trim(
                              Mage::getStoreConfigFlag(
                                  self::XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER,
                                  $store
                              )
                          );
                      case 'creditmemo':
                          return trim(
                              Mage::getStoreConfigFlag(
                                  self::XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER,
                                  $store
                              )
                          );
                  }

                  return true; // backwards compatibility
              }

              /**
               * Return scaled image sizes based on an path to an image file.
               *
               * @param  string $image     Url to image file.
               * @param  int    $maxWidth  max width the image can have
               * @param  int    $maxHeight max height the image can have
               *
               * @return array  with 2 elements - width and height.
               */
              public function getScaledImageSize($image, $maxWidth, $maxHeight)
              {
                  list($width, $height) = getimagesize($image);

                  if ($height > $maxHeight or $width > $maxWidth) {
                      // Calculate max variance to match dimensions.
                      $widthVar = $width / $maxWidth;
                      $heightVar = $height / $maxHeight;

                      // Calculate scale factor to match dimensions.
                      if ($widthVar > $heightVar) {
                          $scale = $maxWidth / $width;
                      } else {
                          $scale = $maxHeight / $height;
                      }

                      // Calculate new dimensions.
                      $height = round($height * $scale);
                      $width = round($width * $scale);
                  }

                  return array($width, $height);
              }

              /**
               * Return export pattern config value
               *
               * @param  string $type the type of this document like invoice, shipment or creditmemo
               *
               * @return string
               */
              public function getExportPattern($type)
              {
                  switch ($type) {
                      case 'invoice':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN
                          );
                      case 'shipment':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN
                          );
                  }

                  return true;
              }

              /**
               * Return export pattern for multiple documents config value
               *
               * @param  string $type the type of this document like invoice, shipment or creditmemo
               *
               * @return string
               */
              public function getExportPatternForMultipleDocuments($type)
              {
                  switch ($type) {
                      case 'invoice':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS
                          );
                      case 'shipment':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS
                          );
                      case 'creditmemo':
                          return Mage::getStoreConfig(
                              self::XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS
                          );
                  }

                  return true;
              }

              /**
               * Gets the variables which can be used as a placeholder in the filename.
               *
               * @param  Mage_Core_Model_Abstract $model the model instance
               *
               * @return array with the variables which can be use as placeholders in the filename
               */
              public function getModelVars($model)
              {
                  if (!$model instanceof Mage_Sales_Model_Order) {
                      switch ($model) {
                          case $model instanceof Mage_Sales_Model_Order_Invoice:
                              $specificVars = array(
                                  '{{invoice_id}}' => $model->getIncrementId()
                              );
                              break;
                          case $model instanceof Mage_Sales_Model_Order_Shipment:
                              $specificVars = array(
                                  '{{shipment_id}}' => $model->getIncrementId()
                              );
                              break;
                          case $model instanceof Mage_Sales_Model_Order_Creditmemo:
                              $specificVars = array(
                                  '{{creditmemo_id}}' => $model->getIncrementId()
                              );
                      }

                      $order = $model->getOrder();
                      $commonVars = array(
                          '{{order_id}}'           => $order->getIncrementId(),
                          '{{customer_id}}'        => $order->getCustomerId(),
                          '{{customer_name}}'      => $order->getCustomerName(),
                          '{{customer_firstname}}' => $order->getCustomerFirstname(),
                          '{{customer_lastname}}'  => $order->getCustomerLastname()
                      );

                      return array_merge($specificVars, $commonVars);
                  } else {
                      return array(
                          '{{order_id}}'           => $model->getIncrementId(),
                          '{{customer_id}}'        => $model->getCustomerId(),
                          '{{customer_name}}'      => $model->getCustomerName(),
                          '{{customer_firstname}}' => $model->getCustomerFirstname(),
                          '{{customer_lastname}}'  => $model->getCustomerLastname()
                      );
                  }
              }

              /**
               * The filename of the exported file.
               *
               * @param  string                   $type  the type of this document like invoice, shipment or creditmemo
               * @param  Mage_Core_Model_Abstract $model the model instance
               *
               * @return string the filename of the exported file
               */
              public function getExportFilename($type, $model)
              {
                  $type = (!$type) ? 'invoice' : $type;
                  $pattern = $this->getExportPattern($type);
                  if (!$pattern) {
                      if ($type == 'shipment') {
                          $pattern = 'packingslip';
                      } else {
                          $pattern = $type;
                      }

                      $date = Mage::getSingleton('core/date');
                      $pattern .= $date->date('Y-m-d_H-i-s');
                  }

                  if (substr($pattern, -4) != '.pdf') {
                      $pattern = $pattern . '.pdf';
                  }

                  $path = strftime($pattern, strtotime($model->getCreatedAt()));
                  $vars = $this->getModelVars($model);

                  return strtr($path, $vars);
              }

              /**
               * The filename of the exported file if multiple documents are printed at once.
               *
               * @param string $type the type of this document like invoice, shipment or creditmemo
               *
               * @return string the filename of the exported file
               */
              public function getExportFilenameForMultipleDocuments($type)
              {
                  $type = (!$type) ? 'invoice' : $type;
                  $pattern = $this->getExportPatternForMultipleDocuments($type);
                  if (!$pattern) {
                      if ($type == 'shipment') {
                          $pattern = 'packingslip';
                      } else {
                          $pattern = $type;
                      }

                      $date = Mage::getSingleton('core/date');
                      $pattern .= $date->date('Y-m-d_H-i-s');
                  }

                  if (substr($pattern, -4) != '.pdf') {
                      $pattern = $pattern . '.pdf';
                  }

                  return strftime($pattern);
              }

              /**
               * Returns the path where the fonts reside.
               *
               * @return string the path where the fonts reside
               */
              public function getFontPath()
              {
                  return Mage::getBaseDir('media') . self::FONT_PATH_IN_MEDIA;
              }

              public function getPageSizeConfigPath()
              {
                  return Mage::getStoreConfig(self::XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE);
              }

              /**
               * Get configured PDF color
               *
               * @param string $path System config path
               * @return Zend_Pdf_Color_Html
               */
              protected function getColor($path)
              {
                  return new Zend_Pdf_Color_Html('#' . trim($path), '#');
              }
              /**
               * Get text color
               *
               * @return Zend_Pdf_Color_Html
               */
              public function getTextColor()
              {
                  return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_TEXT));
              }
              /**
               * Get table header color
               *
               * @return Zend_Pdf_Color_Html
               */
              public function getHeaderColor()
              {
                  return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_TABLE_HEADER));
              }
              /**
               * Get footer color
               *
               * @return Zend_Pdf_Color_Html
               */
              public function getFooterColor()
              {
                  return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_FOOTER));
              }
              /**
               * Get label color
               *
               * @return Zend_Pdf_Color_Html
               */
              public function getLabelColor()
              {
                  return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_LABELS));
              }
          }

          Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
          diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Invoice.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Invoice.php.xhtml new file mode 100644 index 0000000..07766bc --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/Invoice.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Invoice.php

          Source of file Invoice.php

          + Size: 1,982 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

          /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Helper/Invoice.php

          123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
          <?php
          /**
           * This file is part of a FireGento e.V. module.
           *
           * This FireGento e.V. module is free software; you can redistribute it and/or
           * modify it under the terms of the GNU General Public License version 3 as
           * published by the Free Software Foundation.
           *
           * This script is distributed in the hope that it will be useful, but WITHOUT
           * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
           * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
           *
           * PHP version 5
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           * @copyright 2014 FireGento Team (http://www.firegento.com)
           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
           */

          /**
           * Helper for invoice creation.
           *
           * @category  FireGento
           * @package   FireGento_Pdf
           * @author    FireGento Team <team@firegento.com>
           */
          class FireGento_Pdf_Helper_Invoice extends Mage_Core_Helper_Abstract
          {

              /**
               * Gets the notes for the shipping country of the given order.
               *
               * @param Mage_Sales_Model_Order $order
               *
               * @return array the notes for the shipping country of the given order - may be empty!
               */
              public function getShippingCountryNotes(Mage_Sales_Model_Order $order)
              {
                  if (!$order->getIsVirtual()) {
                      $shippingCountryId = $order->getShippingAddress()->getCountryId();
                      $countryNotes = unserialize(Mage::getStoreConfig('sales_pdf/invoice/shipping_country_notes'));
                      if ($countryNotes) {
                          $shippingCountryNotes = array();
                          foreach ($countryNotes as $countryNote) {
                              if ($countryNote['country'] == $shippingCountryId) {
                                  $shippingCountryNotes[] = $countryNote['note'];
                              }
                          }

                          return $shippingCountryNotes;
                      }
                  }

                  return array();
              }

          }

          Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
          diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/index.xhtml index 9fb7e01..419512d 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Helper/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

          Source of FireGento_Pdf

          - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

          • @@ -89,14 +89,22 @@ Data.php - 10.3 KB + 17.0 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 + + + + Invoice.php + + 1.9 KB + + 2018-03-12T19:59:19+00:00 - Total: 1 files + Total: 2 files diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xhtml index 4d6f1d3..d8fb377 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Creditmemo.php

            Source of file Creditmemo.php

            - Size: 2,247 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

            /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php

            123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
            <?php
            /**
             * This file is part of the FIREGENTO project.
             *
             * FireGento_Pdf is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */
            /**
             * Creditmemo model rewrite.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */
            class FireGento_Pdf_Model_Creditmemo
            {

                /**
                 * The actual PDF engine responsible for rendering the file.
                 * @var Mage_Sales_Model_Order_Pdf_Abstract
                 */
                private $_engine;

                /**
                 * get pdf renderer engine
                 *
                 * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Creditmemo
                 */
                protected function getEngine()
                {
                    if (!$this->_engine) {
                        $modelClass = Mage::getStoreConfig('sales_pdf/creditmemo/engine');
                        $engine = Mage::getModel($modelClass);

                        if (!$engine) {
                            // Fallback to Magento standard creditmemo layout.
                            $engine = new Mage_Sales_Model_Order_Pdf_Creditmemo();
                        }

                        $this->_engine = $engine;
                    }

                    return $this->_engine;
                }

                /**
                 * get pdf object
                 *
                 * @param  array|Varien_Data_Collection $creditmemos creditmemos to render
                 *
                 * @return Zend_Pdf
                 */
                public function getPdf($creditmemos = array())
                {
                    return $this->getEngine()->getPdf($creditmemos);
                }

            }

            + Size: 2,185 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php

            12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
            <?php
            /**
             * This file is part of a FireGento e.V. module.
             *
             * This FireGento e.V. module is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2014 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             */
            /**
             * Creditmemo model rewrite.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             */
            class FireGento_Pdf_Model_Creditmemo extends Mage_Sales_Model_Order_Pdf_Creditmemo
            {

                /**
                 * The actual PDF engine responsible for rendering the file.
                 * @var Mage_Sales_Model_Order_Pdf_Abstract
                 */
                protected $_engine;

                /**
                 * get pdf renderer engine
                 *
                 * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Creditmemo
                 */
                protected function getEngine()
                {
                    if (!$this->_engine) {
                        $modelClass = Mage::getStoreConfig('sales_pdf/creditmemo/engine');
                        $engine = Mage::getModel($modelClass);

                        if (!$engine || $engine instanceof FireGento_Pdf_Model_Creditmemo) {
                            // Fallback to Magento standard creditmemo layout.
                            // use new here to circumvent our own rewrite
                            $engine = new Mage_Sales_Model_Order_Pdf_Creditmemo();
                        }

                        $this->_engine = $engine;
                    }

                    return $this->_engine;
                }

                /**
                 * get pdf object
                 *
                 * @param  array|Varien_Data_Collection $creditmemos creditmemos to render
                 *
                 * @return Zend_Pdf
                 */
                public function getPdf($creditmemos = array())
                {
                    return $this->getEngine()->getPdf($creditmemos);
                }

            }

            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xhtml index fe0d837..b072e2e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Abstract.php

            Source of file Abstract.php

            - Size: 47,433 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

            /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php

            1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429
            <?php
            /**
             * This file is part of the FIREGENTO project.
             *
             * FireGento_Pdf is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */

            /**
             * Abstract pdf model.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */
            abstract class FireGento_Pdf_Model_Engine_Abstract
                extends Mage_Sales_Model_Order_Pdf_Abstract
            {
                public $margin = array('left' => 45, 'right' => 540);
                public $colors = array();
                public $mode;
                public $encoding;
                public $pagecounter;

                protected $_imprint;

                /**
                 * @var int correct all y values if the logo is full width and bigger than normal
                 */
                protected $_marginTop = 0;

                /**
                 * constructor to init settings
                 */
                public function __construct()
                {
                    parent::__construct();

                    $this->encoding = 'UTF-8';

                    $this->colors['black'] = new Zend_Pdf_Color_GrayScale(0);
                    $this->colors['grey1'] = new Zend_Pdf_Color_GrayScale(0.9);

                    // get the default imprint
                    $this->_imprint = Mage::getStoreConfig('general/imprint');
                }

                /**
                 * Draw one line
                 *
                 * @param  Zend_Pdf_Page $page         Current page object of Zend_Pdf
                 * @param  array         $draw         items to draw
                 * @param  array         $pageSettings page settings to use for new pages
                 *
                 * @return Zend_Pdf_Page
                 */
                public function drawLineBlocks(
                    Zend_Pdf_Page $page,
                    array $draw,
                    array $pageSettings = array()
                ) {
                    foreach ($draw as $itemsProp) {
                        if (!isset($itemsProp['lines']) || !is_array($itemsProp['lines'])) {
                            Mage::throwException(Mage::helper('sales')
                                ->__('Invalid draw line data. Please define "lines" array'));
                        }
                        $lines = $itemsProp['lines'];
                        $height = isset($itemsProp['height']) ? $itemsProp['height'] : 10;

                        if (empty($itemsProp['shift'])) {
                            $shift = 0;
                            foreach ($lines as $line) {
                                $maxHeight = 0;
                                foreach ($line as $column) {
                                    $lineSpacing = !empty($column['height'])
                                        ? $column['height'] : $height;
                                    if (!is_array($column['text'])) {
                                        $column['text'] = array($column['text']);
                                    }
                                    $top = 0;
                                    foreach ($column['text'] as $part) {
                                        $top += $lineSpacing;
                                    }

                                    $maxHeight = $top > $maxHeight ? $top : $maxHeight;
                                }
                                $shift += $maxHeight;
                            }
                            $itemsProp['shift'] = $shift;
                        }

                        if ($this->y - $itemsProp['shift'] < 50
                            || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer')
                                == 1
                                && $this->y - $itemsProp['shift'] < 100)
                        ) {
                            $page = $this->newPage($pageSettings);
                        }

                        foreach ($lines as $line) {
                            $maxHeight = 0;
                            foreach ($line as $column) {
                                $fontSize = empty($column['font_size']) ? 7
                                    : $column['font_size'];
                                if (!empty($column['font_file'])) {
                                    $font
                                        = Zend_Pdf_Font::fontWithPath($column['font_file']);
                                    $page->setFont($font, $fontSize);
                                } else {
                                    $fontStyle = empty($column['font']) ? 'regular'
                                        : $column['font'];
                                    switch ($fontStyle) {
                                        case 'bold':
                                            $font = $this->_setFontBold($page, $fontSize);
                                            break;
                                        case 'italic':
                                            $font = $this->_setFontItalic($page, $fontSize);
                                            break;
                                        default:
                                            $font = $this->_setFontRegular($page,
                                                $fontSize);
                                            break;
                                    }
                                }

                                if (!is_array($column['text'])) {
                                    $column['text'] = array($column['text']);
                                }

                                $lineSpacing = !empty($column['height']) ? $column['height']
                                    : $height;
                                $top = 0;
                                foreach ($column['text'] as $part) {
                                    $feed = $column['feed'];
                                    $textAlign = empty($column['align']) ? 'left'
                                        : $column['align'];
                                    $width = empty($column['width']) ? 0 : $column['width'];
                                    switch ($textAlign) {
                                        case 'right':
                                            if ($width) {
                                                $feed = $this->getAlignRight($part, $feed,
                                                    $width, $font, $fontSize);
                                            } else {
                                                $feed = $feed
                                                    - $this->widthForStringUsingFontSize($part,
                                                        $font, $fontSize);
                                            }
                                            break;
                                        case 'center':
                                            if ($width) {
                                                $feed = $this->getAlignCenter($part, $feed,
                                                    $width, $font, $fontSize);
                                            }
                                            break;
                                    }
                                    $page->drawText($part, $feed, $this->y - $top, 'UTF-8');
                                    $top += $lineSpacing;
                                }

                                $maxHeight = $top > $maxHeight ? $top : $maxHeight;
                            }
                            $this->y -= $maxHeight;
                        }
                    }

                    return $page;
                }

                /**
                 * Set pdf mode.
                 *
                 * @param  string $mode set mode to differ between creditmemo, invoice, etc.
                 *
                 * @return FireGento_Pdf_Model_Engine_Abstract
                 */
                public function setMode($mode)
                {
                    $this->mode = $mode;
                    return $this;
                }

                /**
                 * Return pdf mode.
                 *
                 * @return string
                 */
                public function getMode()
                {
                    return $this->mode;
                }

                /**
                 * Set next line position
                 *
                 * @param  int $height Line-Height
                 *
                 * @return void
                 */
                protected function Ln($height = 15)
                {
                    $this->y -= $height;
                }

                /**
                 * Insert sender address bar
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertSenderAddessBar(&$page)
                {
                    if (Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar')
                        != ''
                    ) {
                        $this->_setFontRegular($page, 6);
                        $page->drawText(
                            trim(Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar')),
                            $this->margin['left'] + $this->getHeaderblockOffset(),
                            $this->y, $this->encoding
                        );
                    }
                }

                /**
                 * Insert logo
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 * @param  mixed         $store store to get data from
                 *
                 * @return void
                 */
                protected function insertLogo(&$page, $store = null)
                {
                    if ($this->_isLogoFullWidth($store)) {
                        $this->_insertLogoFullWidth($page, $store);
                    } else {
                        $this->_insertLogoPositioned($page, $store);
                    }
                }

                /**
                 * is the setting to show the logo full width?
                 *
                 * @param  mixed $store store we want the config setting from
                 *
                 * @return bool
                 */
                protected function _isLogoFullWidth($store)
                {
                    return Mage::helper('firegento_pdf')->isLogoFullWidth($store);
                }

                /**
                 * Inserts the logo if it is positioned left, center or right.
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 * @param  mixed         $store store to get data from
                 *
                 * @return void
                 */
                protected function _insertLogoPositioned(&$page, $store = null)
                {
                    $imageRatio
                        = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio',
                        $store);
                    $imageRatio = (empty($imageRatio)) ? 1 : $imageRatio;

                    $maxwidth
                        = ($this->margin['right'] - $this->margin['left']) * $imageRatio
                        / 100;
                    $maxheight = 100;

                    $image = Mage::getStoreConfig('sales/identity/logo', $store);
                    if ($image and file_exists(Mage::getBaseDir('media', $store)
                            . '/sales/store/logo/' . $image)
                    ) {
                        $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/'
                            . $image;

                        list ($width, $height) = Mage::helper('firegento_pdf')
                            ->getScaledImageSize($image, $maxwidth, $maxheight);

                        if (is_file($image)) {
                            $image = Zend_Pdf_Image::imageWithPath($image);

                            $logoPosition
                                = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position',
                                $store);

                            switch ($logoPosition) {
                                case 'center':
                                    $startLogoAt
                                        = $this->margin['left'] + (($this->margin['right']
                                                - $this->margin['left']) / 2) - $width / 2;
                                    break;
                                case 'right':
                                    $startLogoAt = $this->margin['right'] - $width;
                                    break;
                                default:
                                    $startLogoAt = $this->margin['left'];
                            }

                            $position['x1'] = $startLogoAt;
                            $position['y1'] = 720;
                            $position['x2'] = $position['x1'] + $width;
                            $position['y2'] = $position['y1'] + $height;

                            $page->drawImage($image, $position['x1'], $position['y1'],
                                $position['x2'], $position['y2']);
                        }
                    }
                }

                /**
                 * inserts the logo from complete left to right
                 *
                 * @param Zend_Pdf_Page &$page current Zend_Pdf_Page object
                 * @param mixed         $store store we need the config setting from
                 *
                 * @todo merge _insertLogoPositioned and _insertLogoFullWidth
                 */
                protected function _insertLogoFullWidth(&$page, $store = null)
                {
                    $imageRatio
                        = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio',
                        $store);
                    $imageRatio = (empty($imageRatio)) ? 1 : $imageRatio;

                    $maxwidth = 594 * $imageRatio / 100;
                    $maxheight = 300;

                    $image = Mage::getStoreConfig('sales/identity/logo', $store);
                    if ($image and file_exists(Mage::getBaseDir('media', $store)
                            . '/sales/store/logo/' . $image)
                    ) {
                        $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/'
                            . $image;

                        list ($width, $height) = Mage::helper('firegento_pdf')
                            ->getScaledImageSize($image, $maxwidth, $maxheight);

                        if (is_file($image)) {
                            $image = Zend_Pdf_Image::imageWithPath($image);

                            $logoPosition
                                = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position',
                                $store);

                            switch ($logoPosition) {
                                case 'center':
                                    $startLogoAt = $this->margin['left'] +
                                        (($this->margin['right'] - $this->margin['left'])
                                            / 2) - $width / 2;
                                    break;
                                case 'right':
                                    $startLogoAt = $this->margin['right'] - $width;
                                    break;
                                default:
                                    $startLogoAt = 0;
                            }

                            $position['x1'] = $startLogoAt;
                            $position['y1'] = 663;
                            $position['x2'] = $position['x1'] + $width;
                            $position['y2'] = $position['y1'] + $height;

                            $page->drawImage($image, $position['x1'], $position['y1'],
                                $position['x2'], $position['y2']);
                            $this->_marginTop = $height - 130;
                        }
                    }
                }

                /**
                 * insert customer address and all header like customer number, etc.
                 *
                 * @param Zend_Pdf_Page             $page   current Zend_Pdf_Page
                 * @param Mage_Sales_Model_Abstract $source source for the address information
                 * @param Mage_Sales_Model_Order    $order  order to print the document for
                 */
                protected function insertAddressesAndHeader(
                    Zend_Pdf_Page $page,
                    Mage_Sales_Model_Abstract $source,
                    Mage_Sales_Model_Order $order
                ) {
                    // Add logo
                    $this->insertLogo($page, $source->getStore());

                    // Add billing address
                    $this->y = 692 - $this->_marginTop;
                    $this->_insertCustomerAddress($page, $order);

                    // Add sender address
                    $this->y = 705 - $this->_marginTop;
                    $this->_insertSenderAddessBar($page);

                    // Add head
                    $this->y = 592 - $this->_marginTop;
                    $this->insertHeader($page, $order, $source);

                    /* Add table head */
                    // make sure that item table does not overlap heading
                    if ($this->y > 575 - $this->_marginTop) {
                        $this->y = 575 - $this->_marginTop;
                    }
                }

                /**
                 * Inserts the customer address. The default address is the billing address.
                 *
                 * @param  Zend_Pdf_Page          &$page Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order Order object
                 *
                 * @return void
                 */
                protected function _insertCustomerAddress(&$page, $order)
                {
                    $this->_setFontRegular($page, 9);
                    $billing = $this->_formatAddress($order->getBillingAddress()
                        ->format('pdf'));
                    foreach ($billing as $line) {
                        $page->drawText(trim(strip_tags($line)),
                            $this->margin['left'] + $this->getHeaderblockOffset(), $this->y,
                            $this->encoding);
                        $this->Ln(12);
                    }
                }

                /**
                 * get the offset to position the address block left or right
                 *
                 * @return int
                 */
                protected function getHeaderblockOffset()
                {
                    if (Mage::getStoreConfig('sales_pdf/firegento_pdf/headerblocks_position')
                        == FireGento_Pdf_Model_System_Config_Source_Headerblocks::LEFT
                    ) {
                        $offsetAdjustment = 0;
                    } else {
                        $offsetAdjustment = 315;
                    }
                    return $offsetAdjustment;
                }

                /**
                 * Insert Header
                 *
                 * @param  Zend_Pdf_Page          &$page    Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order    Order object
                 * @param  object                 $document Document object
                 *
                 * @return void
                 */
                protected function insertHeader(&$page, $order, $document)
                {
                    $page->setFillColor($this->colors['black']);

                    $mode = $this->getMode();

                    $this->_setFontBold($page, 15);

                    if ($mode == 'invoice') {
                        $title = 'Invoice';
                    } elseif ($mode == 'shipment') {
                        $title = 'Shipment';
                    } else {
                        $title = 'Creditmemo';
                    }
                    $page->drawText(Mage::helper('firegento_pdf')->__($title),
                        $this->margin['left'], $this->y, $this->encoding);

                    $this->_setFontRegular($page);

                    $this->y += 80;
                    $labelRightOffset = 180 + $this->getHeaderblockOffset();

                    $valueRightOffset = 10 + $this->getHeaderblockOffset();
                    $font = $this->_setFontRegular($page, 10);
                    $width = 80;
                    $numberOfLines = 0;


                    // Invoice/shipment/creditmemo Number
                    if ($mode == 'invoice') {
                        $numberTitle = 'Invoice number:';
                    } elseif ($mode == 'shipment') {
                        $numberTitle = 'Shipment number:';
                    } else {
                        $numberTitle = 'Creditmemo number:';
                    }
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__($numberTitle),
                        ($this->margin['right'] - $labelRightOffset), $this->y,
                        $this->encoding
                    );

                    $incrementId = $document->getIncrementId();
                    $page->drawText(
                        $incrementId,
                        ($this->margin['right'] - $valueRightOffset
                            - $this->widthForStringUsingFontSize($incrementId, $font, 10)),
                        $this->y, $this->encoding
                    );
                    $this->Ln();
                    $numberOfLines++;

                    // Order Number
                    $putOrderId = $this->_putOrderId($order);
                    if ($putOrderId) {
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Order number:'),
                            ($this->margin['right'] - $labelRightOffset),
                            $this->y, $this->encoding
                        );
                        $page->drawText(
                            $putOrderId, ($this->margin['right'] - $valueRightOffset
                                - $this->widthForStringUsingFontSize(
                                    $putOrderId, $font, 10
                                )), $this->y, $this->encoding
                        );
                        $this->Ln();
                        $numberOfLines++;
                    }

                    // Customer Number
                    if ($this->_showCustomerNumber($order->getStore())) {
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Customer number:'),
                            ($this->margin['right'] - $labelRightOffset),
                            $this->y, $this->encoding
                        );
                        $numberOfLines++;

                        if ($order->getCustomerId() != '') {

                            $prefix
                                = Mage::getStoreConfig('sales_pdf/invoice/customeridprefix');

                            if (!empty($prefix)) {
                                $customerid = $prefix . $order->getCustomerId();
                            } else {
                                $customerid = $order->getCustomerId();
                            }

                            $page->drawText(
                                $customerid, ($this->margin['right'] - $valueRightOffset
                                    - $this->widthForStringUsingFontSize(
                                        $customerid, $font, 10
                                    )), $this->y, $this->encoding
                            );
                            $this->Ln();
                            $numberOfLines++;
                        } else {
                            $page->drawText(
                                '-',
                                ($this->margin['right'] - $valueRightOffset
                                    - $this->widthForStringUsingFontSize('-', $font, 10)),
                                $this->y, $this->encoding
                            );
                            $this->Ln();
                            $numberOfLines++;
                        }
                    }

                    // Customer IP
                    if (!Mage::getStoreConfigFlag('sales/general/hide_customer_ip',
                        $order->getStoreId())
                    ) {
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Customer IP:'),
                            ($this->margin['right'] - $labelRightOffset),
                            $this->y, $this->encoding
                        );
                        $customerIP = $order->getData('remote_ip');
                        $font = $this->_setFontRegular($page, 10);
                        $page->drawText(
                            $customerIP, ($this->margin['right'] - $valueRightOffset
                                - $this->widthForStringUsingFontSize(
                                    $customerIP, $font, 10
                                )), $this->y, $this->encoding
                        );
                        $this->Ln();
                        $numberOfLines++;
                    }

                    $page->drawText(
                        Mage::helper('firegento_pdf')->__(($mode == 'invoice')
                            ? 'Invoice date:' : 'Date:'),
                        ($this->margin['right'] - $labelRightOffset), $this->y,
                        $this->encoding
                    );
                    $documentDate = Mage::helper('core')
                        ->formatDate($document->getCreatedAtDate(), 'medium', false);
                    $page->drawText(
                        $documentDate,
                        ($this->margin['right'] - $valueRightOffset
                            - $this->widthForStringUsingFontSize($documentDate, $font, 10)),
                        $this->y, $this->encoding
                    );
                    $this->Ln();
                    $numberOfLines++;


                    // Payment method.
                    $putPaymentMethod = ($mode == 'invoice'
                        && Mage::getStoreConfig('sales_pdf/invoice/payment_method_position')
                        == FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_HEADER);
                    if ($putPaymentMethod) {
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Payment method:'),
                            ($this->margin['right'] - $labelRightOffset),
                            $this->y, $this->encoding
                        );
                        $paymentMethodArray = $this->_prepareText(
                            $order->getPayment()->getMethodInstance()->getTitle(), $page,
                            $font, 10, $width
                        );
                        $page->drawText(
                            array_shift($paymentMethodArray),
                            ($this->margin['right'] - $valueRightOffset - $width), $this->y,
                            $this->encoding
                        );
                        $this->Ln();
                        $numberOfLines++;
                        $paymentMethodArray = $this->_prepareText(implode(" ",
                            $paymentMethodArray), $page, $font, 10, 2 * $width);
                        foreach ($paymentMethodArray as $methodString) {
                            $page->drawText($methodString,
                                $this->margin['right'] - $labelRightOffset, $this->y,
                                $this->encoding);
                            $this->Ln();
                            $numberOfLines++;
                        }

                    }

                    // Shipping method.
                    $putShippingMethod = ($mode == 'invoice'
                        &&
                        Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position')
                        == FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER
                        || $mode == 'shipment'
                        &&
                        Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position')
                        == FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER);
                    if ($putShippingMethod) {
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Shipping method:'),
                            ($this->margin['right'] - $labelRightOffset),
                            $this->y, $this->encoding
                        );
                        $shippingMethodArray
                            = $this->_prepareText($order->getShippingDescription(), $page,
                            $font, 10, $width);
                        $page->drawText(
                            array_shift($shippingMethodArray),
                            ($this->margin['right'] - $valueRightOffset - $width), $this->y,
                            $this->encoding
                        );
                        $this->Ln();
                        $numberOfLines++;
                        $shippingMethodArray = $this->_prepareText(
                            implode(" ", $shippingMethodArray), $page, $font, 10, 2 * $width
                        );
                        foreach ($shippingMethodArray as $methodString) {
                            $page->drawText($methodString,
                                $this->margin['right'] - $labelRightOffset, $this->y,
                                $this->encoding);
                            $this->Ln();
                            $numberOfLines++;
                        }

                    }
                    $this->y -= ($numberOfLines * 2);
                }

                /**
                 * Return the order id or false if order id should not be displayed on document.
                 *
                 * @param  Mage_Sales_Model_Order $order order to get id from
                 *
                 * @return int|false
                 */
                protected function _putOrderId($order)
                {
                    return Mage::helper('firegento_pdf')->putOrderId($order, $this->mode);
                }

                /**
                 * do we show the customber number on this document
                 *
                 * @param  mixed $store store from whom we need the config setting
                 *
                 * @return bool
                 */
                protected function _showCustomerNumber($store)
                {
                    return Mage::helper('firegento_pdf')
                        ->showCustomerNumber($this->mode, $store);
                }

                /**
                 * Generate new PDF page.
                 *
                 * @param  array $settings Page settings
                 *
                 * @return Zend_Pdf_Page
                 */
                public function newPage(array $settings = array())
                {
                    $pdf = $this->_getPdf();

                    $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
                    $this->pagecounter++;
                    $pdf->pages[] = $page;

                    $this->_addFooter($page, Mage::app()->getStore());

                    // provide the possibility to add random stuff to the page
                    Mage::dispatchEvent(
                        'firegento_pdf_' . $this->getMode() . '_edit_page',
                        array('page' => $page, 'order' => $this->getOrder())
                    );

                    $this->y = 800;
                    $this->_setFontRegular($page, 9);

                    return $page;
                }

                /**
                 * Draw
                 *
                 * @param  Varien_Object          $item     creditmemo/shipping/invoice to draw
                 * @param  Zend_Pdf_Page          $page     Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order    order to get infos from
                 * @param  int                    $position position in table
                 *
                 * @return Zend_Pdf_Page
                 */
                protected function _drawItem(
                    Varien_Object $item,
                    Zend_Pdf_Page $page,
                    Mage_Sales_Model_Order $order,
                    $position = 1
                ) {
                    $type = $item->getOrderItem()->getProductType();

                    $renderer = $this->_getRenderer($type);
                    $renderer->setOrder($order);
                    $renderer->setItem($item);
                    $renderer->setPdf($this);
                    $renderer->setPage($page);
                    $renderer->setRenderedModel($this);

                    $renderer->draw($position);
                    return $renderer->getPage();
                }

                /**
                 * Insert Totals Block
                 *
                 * @param  object $page   Current page object of Zend_Pdf
                 * @param  object $source Fields of footer
                 *
                 * @return Zend_Pdf_Page
                 */
                protected function insertTotals($page, $source)
                {
                    $this->y -= 15;

                    $order = $source->getOrder();

                    $totalTax = 0;
                    $shippingTaxRate = 0;
                    $shippingTaxAmount = $order->getShippingTaxAmount();

                    if ($shippingTaxAmount > 0) {
                        $shippingTaxRate
                            = $order->getShippingTaxAmount() * 100
                            / ($order->getShippingInclTax()
                                - $order->getShippingTaxAmount());
                    }

                    $groupedTax = array();

                    $items['items'] = array();
                    foreach ($source->getAllItems() as $item) {
                        if ($item->getOrderItem()->getParentItem()) {
                            continue;
                        }
                        $items['items'][] = $item->getOrderItem()->toArray();
                    }

                    array_push(
                        $items['items'], array(
                            'row_invoiced'     => $order->getShippingInvoiced(),
                            'tax_inc_subtotal' => false,
                            'tax_percent'      => $shippingTaxRate,
                            'tax_amount'       => $shippingTaxAmount
                        )
                    );

                    foreach ($items['items'] as $item) {
                        $_percent = null;
                        if (!isset($item['tax_amount'])) {
                            $item['tax_amount'] = 0;
                        }
                        if (!isset($item['row_invoiced'])) {
                            $item['row_invoiced'] = 0;
                        }
                        if (!isset($item['price'])) {
                            $item['price'] = 0;
                        }
                        if (!isset($item['tax_inc_subtotal'])) {
                            $item['tax_inc_subtotal'] = 0;
                        }
                        if (((float)$item['tax_amount'] > 0)
                            && ((float)$item['row_invoiced'] > 0)
                        ) {
                            $_percent = round($item["tax_percent"], 0);
                        }
                        if (!array_key_exists('tax_inc_subtotal', $item)
                            || $item['tax_inc_subtotal']
                        ) {
                            $totalTax += $item['tax_amount'];
                        }
                        if (($item['tax_amount']) && $_percent) {
                            if (!array_key_exists((int)$_percent, $groupedTax)) {
                                $groupedTax[$_percent] = $item['tax_amount'];
                            } else {
                                $groupedTax[$_percent] += $item['tax_amount'];
                            }
                        }
                    }

                    $totals = $this->_getTotalsList($source);

                    $lineBlock = array(
                        'lines'  => array(),
                        'height' => 20
                    );

                    foreach ($totals as $total) {
                        $total->setOrder($order)->setSource($source);

                        if ($total->canDisplay()) {
                            $total->setFontSize(10);
                            // fix Magento 1.8 bug, so that taxes for shipping do not appear twice
                            // see https://github.com/firegento/firegento-pdf/issues/106
                            $uniqueTotalsForDisplay = array_map(
                                'unserialize', array_unique(array_map('serialize',
                                    $total->getTotalsForDisplay()))
                            );
                            foreach ($uniqueTotalsForDisplay as $totalData) {
                                $label = $this->fixNumberFormat($totalData['label']);
                                $lineBlock['lines'][] = array(
                                    array(
                                        'text'      => $label,
                                        'feed'      => 470,
                                        'align'     => 'right',
                                        'font_size' => $totalData['font_size']
                                    ),
                                    array(
                                        'text'      => $totalData['amount'],
                                        'feed'      => 540,
                                        'align'     => 'right',
                                        'font_size' => $totalData['font_size']
                                    ),
                                );
                            }
                        }
                    }
                    $page = $this->drawLineBlocks($page, array($lineBlock));
                    return $page;
                }

                /**
                 * Insert Notes
                 *
                 * @param  Zend_Pdf_Page             $page   Current Page Object of Zend_PDF
                 * @param  Mage_Sales_Model_Order    &$order order to get note from
                 * @param  Mage_Sales_Model_Abstract &$model invoice/shipment/creditmemo
                 *
                 * @return \Zend_Pdf_Page
                 */
                protected function _insertNote($page, &$order, &$model)
                {
                    $fontSize = 10;
                    $font = $this->_setFontRegular($page, $fontSize);
                    $this->y = $this->y - 60;

                    $notes = array();
                    $result = new Varien_Object();
                    $result->setNotes($notes);
                    Mage::dispatchEvent(
                        'firegento_pdf_' . $this->getMode() . '_insert_note',
                        array(
                            'order'          => $order,
                            $this->getMode() => $model,
                            'result'         => $result
                        )
                    );
                    $notes = array_merge($notes, $result->getNotes());

                    // Get free text notes.
                    $note = Mage::getStoreConfig('sales_pdf/' . $this->getMode() . '/note');
                    if (!empty($note)) {
                        $tmpNotes = explode("\n", $note);
                        $notes = array_merge($notes, $tmpNotes);
                    }

                    // Draw notes on PDF.
                    foreach ($notes as $note) {
                        // prepare the text so that it fits to the paper
                        foreach ($this->_prepareText($note, $page, $font, 10) as $tmpNote) {
                            // create a new page if necessary
                            if ($this->y < 50
                                || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer')
                                    == 1
                                    && $this->y < 100)
                            ) {
                                $page = $this->newPage(array());
                                $this->y = $this->y - 60;
                                $font = $this->_setFontRegular($page, $fontSize);
                            }
                            $page->drawText($tmpNote, $this->margin['left'], $this->y + 30,
                                $this->encoding);
                            $this->Ln(15);
                        }
                    }
                    return $page;
                }

                /**
                 * draw footer on pdf
                 *
                 * @param Zend_Pdf_Page &$page page to draw on
                 * @param mixed         $store store to get infos from
                 */
                protected function _addFooter(&$page, $store = null)
                {
                    // get the imprint of the store if a store is set
                    if (!empty($store)) {
                        $imprintObject = new Varien_Object();
                        $imprintObject->setImprint(Mage::getStoreConfig('general/imprint',
                            $store));
                        Mage::dispatchEvent('firegento_pdf_imprint_load_after', array(
                                'transport_object' => $imprintObject
                            )
                        );
                        $this->_imprint = $imprintObject->getImprint();
                    }

                    // Add footer if GermanSetup is installed.
                    if ($this->_imprint
                        && Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1
                    ) {
                        $this->y = 110;
                        $this->_insertFooter($page);

                        // Add page counter.
                        $this->y = 110;
                        $this->_insertPageCounter($page);
                    }
                }

                /**
                 * Insert footer
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertFooter(&$page)
                {
                    $page->setLineColor($this->colors['black']);
                    $page->setLineWidth(0.5);
                    $page->drawLine($this->margin['left'] - 20, $this->y - 5,
                        $this->margin['right'] + 30, $this->y - 5);

                    $this->Ln(15);
                    $this->_insertFooterAddress($page);

                    $fields = array(
                        'telephone' => Mage::helper('firegento_pdf')->__('Telephone:'),
                        'fax'       => Mage::helper('firegento_pdf')->__('Fax:'),
                        'email'     => Mage::helper('firegento_pdf')->__('E-Mail:'),
                        'web'       => Mage::helper('firegento_pdf')->__('Web:')
                    );
                    $this->_insertFooterBlock($page, $fields, 70, 40, 140);

                    $fields = array(
                        'bank_name'          => Mage::helper('firegento_pdf')
                            ->__('Bank name:'),
                        'bank_account'       => Mage::helper('firegento_pdf')
                            ->__('Account:'),
                        'bank_code_number'   => Mage::helper('firegento_pdf')
                            ->__('Bank number:'),
                        'bank_account_owner' => Mage::helper('firegento_pdf')
                            ->__('Account owner:'),
                        'swift'              => Mage::helper('firegento_pdf')->__('SWIFT:'),
                        'iban'               => Mage::helper('firegento_pdf')->__('IBAN:')
                    );
                    $this->_insertFooterBlock($page, $fields, 215, 50, 150);

                    $fields = array(
                        'tax_number'      => Mage::helper('firegento_pdf')
                            ->__('Tax number:'),
                        'vat_id'          => Mage::helper('firegento_pdf')->__('VAT-ID:'),
                        'register_number' => Mage::helper('firegento_pdf')
                            ->__('Register number:'),
                        'ceo'             => Mage::helper('firegento_pdf')->__('CEO:'),
                        'city'            => Mage::helper('firegento_pdf')
                            ->__('Registered seat:'),
                        'court'           => Mage::helper('firegento_pdf')
                            ->__('Register court:'),
                    );
                    $this->_insertFooterBlock($page, $fields, 355, 60,
                        $this->margin['right'] - 365 - 10);
                }

                /**
                 * Insert footer block
                 *
                 * @param  Zend_Pdf_Page &$page       Current page object of Zend_Pdf
                 * @param  array         $fields      Fields of footer
                 * @param  int           $colposition Starting colposition
                 * @param  int           $valadjust   Margin between label and value
                 * @param  int           $colwidth    the width of this footer block - text will be wrapped if it is broader
                 *                                    than this width
                 *
                 * @return void
                 */
                protected function _insertFooterBlock(
                    &$page,
                    $fields,
                    $colposition = 0,
                    $valadjust = 30,
                    $colwidth = null
                ) {
                    $fontSize = 7;
                    $font = $this->_setFontRegular($page, $fontSize);
                    $y = $this->y;

                    $valposition = $colposition + $valadjust;

                    if (is_array($fields)) {
                        foreach ($fields as $field => $label) {
                            if (empty($this->_imprint[$field])) {
                                continue;
                            }
                            // draw the label
                            $page->drawText($label, $this->margin['left'] + $colposition,
                                $y, $this->encoding);
                            // prepare the value: wrap it if necessary
                            $val = $this->_imprint[$field];
                            $width = $colwidth;
                            if (!empty($colwidth)) {
                                // calculate the maximum width for the value
                                $width = $this->margin['left'] + $colposition + $colwidth
                                    - ($this->margin['left'] + $valposition);
                            }
                            foreach (
                                $this->_prepareText($val, $page, $font, $fontSize, $width)
                                as $tmpVal
                            ) {
                                $page->drawText($tmpVal,
                                    $this->margin['left'] + $valposition, $y,
                                    $this->encoding);
                                $y -= 12;
                            }
                        }
                    }
                }

                /**
                 * Insert address of store owner
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 * @param  mixed         $store store to get info from
                 *
                 * @return void
                 */
                protected function _insertFooterAddress(&$page, $store = null)
                {
                    $fontSize = 7;
                    $font = $this->_setFontRegular($page, $fontSize);
                    $y = $this->y;
                    $address = '';

                    foreach (
                        $this->_prepareText($this->_imprint['company_first'], $page, $font,
                            $fontSize, 90) as $companyFirst
                    ) {
                        $address .= $companyFirst . "\n";
                    }

                    if (array_key_exists('company_second', $this->_imprint)) {
                        foreach (
                            $this->_prepareText($this->_imprint['company_second'], $page,
                                $font, $fontSize, 90) as $companySecond
                        ) {
                            $address .= $companySecond . "\n";
                        }
                    }

                    if (array_key_exists('street', $this->_imprint)) {
                        $address .= $this->_imprint['street'] . "\n";
                    }
                    if (array_key_exists('zip', $this->_imprint)) {
                        $address .= $this->_imprint['zip'] . " ";
                    }
                    if (array_key_exists('city', $this->_imprint)) {
                        $address .= $this->_imprint['city'] . "\n";
                    }

                    if (!empty($this->_imprint['country'])) {
                        $countryName = Mage::getModel('directory/country')
                            ->loadByCode($this->_imprint['country'])->getName();
                        $address .= Mage::helper('core')->__($countryName);
                    }

                    foreach (explode("\n", $address) as $value) {
                        if ($value !== '') {
                            $page->drawText(trim(strip_tags($value)),
                                $this->margin['left'] - 20, $y, $this->encoding);
                            $y -= 12;
                        }
                    }
                }

                /**
                 * Insert page counter
                 *
                 * @param  Zend_Pdf_Page &$page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertPageCounter(&$page)
                {
                    $font = $this->_setFontRegular($page, 9);
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Page') . ' '
                        . $this->pagecounter,
                        $this->margin['right'] - 23
                        - $this->widthForStringUsingFontSize($this->pagecounter, $font, 9),
                        $this->y,
                        $this->encoding
                    );
                }

                /**
                 * get stanard font
                 *
                 * @return Zend_Pdf_Resource_Font the regular font
                 */
                public function getFontRegular()
                {
                    if ($this->getRegularFont() && $this->regularFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getRegularFontFile());
                    }
                    return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
                }

                /**
                 * Set default font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontRegular($object, $size = 10)
                {
                    $font = $this->getFontRegular();
                    $object->setFont($font, $size);
                    return $font;
                }

                /**
                 * get default bold font
                 *
                 * @return Zend_Pdf_Resource_Font the bold font
                 */
                public function getFontBold()
                {
                    if ($this->getBoldFont() && $this->boldFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getBoldFontFile());
                    }
                    return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);
                }

                /**
                 * Set bold font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontBold($object, $size = 10)
                {
                    $font = $this->getFontBold();
                    $object->setFont($font, $size);
                    return $font;
                }

                /**
                 * get italic font
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                public function getFontItalic()
                {
                    if ($this->getItalicFont() && $this->italicFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getItalicFontFile());
                    }
                    return Zend_Pdf_Font::fontWithName(
                        Zend_Pdf_Font::FONT_HELVETICA_ITALIC
                    );
                }

                /**
                 * Set italic font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontItalic($object, $size = 10)
                {
                    $font = $this->getFontItalic();
                    $object->setFont($font, $size);
                    return $font;
                }

                /**
                 * Prepares the text so that it fits to the given page's width.
                 *
                 * @param  string                 $text     the text which should be prepared
                 * @param  Zend_Pdf_Page          $page     the page on which the text will be rendered
                 * @param  Zend_Pdf_Resource_Font $font     the font with which the text will be rendered
                 * @param  int                    $fontSize the font size with which the text will be rendered
                 * @param  int                    $width    [optional] the width for the given text, defaults to the page width
                 *
                 * @return array the given text in an array where each item represents a new line
                 */
                public function _prepareText($text, $page, $font, $fontSize, $width = null)
                {
                    if (empty($text)) {
                        return array();
                    }
                    $lines = '';
                    $currentLine = '';
                    // calculate the page's width with respect to the margins
                    if (empty($width)) {
                        $width
                            = $page->getWidth() - $this->margin['left'] - ($page->getWidth()
                                - $this->margin['right']);
                    }
                    $textChunks = explode(' ', $text);
                    foreach ($textChunks as $textChunk) {
                        if ($this->widthForStringUsingFontSize($currentLine . ' '
                                . $textChunk, $font, $fontSize) < $width
                        ) {
                            // do not add whitespace on first line
                            if (!empty($currentLine)) {
                                $currentLine .= ' ';
                            }
                            $currentLine .= $textChunk;
                        } else {
                            // text is too broad, so add new line character
                            $lines .= $currentLine . "\n";
                            $currentLine = $textChunk;
                        }
                    }
                    // append the last line
                    $lines .= $currentLine;
                    return explode("\n", $lines);
                }

                /**
                 * Fix the percentage for taxes which come with four decimal places
                 * from magento core.
                 *
                 * @param  string $label tax label which contains the badly formatted tax percentage
                 *
                 * @return string
                 */
                private function fixNumberFormat($label)
                {
                    $pattern = "/(.*)\((\d{1,2}\.\d{4}%)\)/";
                    if (preg_match($pattern, $label, $matches)) {
                        $percentage = Zend_Locale_Format::toNumber(
                            $matches[2],
                            array(
                                'locale'    => Mage::app()->getLocale()->getLocale(),
                                'precision' => 2,
                            )
                        );
                        return $matches[1] . '(' . $percentage . '%)';
                    }
                    return $label;
                }

                /**
                 * get bold font file
                 *
                 * @return string
                 */
                private function getBoldFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS
                    . $this->getBoldFont();
                }

                /**
                 * get bold font path
                 *
                 * @return string
                 */
                private function getBoldFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_BOLD_FONT
                    );
                }

                /**
                 * check whether font file exists for bold font
                 *
                 * @return bool
                 */
                private function regularFontFileExists()
                {
                    return file_exists($this->getBoldFontFile());
                }

                /**
                 * get italic font path
                 *
                 * @return string
                 */
                private function getItalicFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_ITALIC_FONT
                    );
                }

                /**
                 * check whether italic font file exists
                 *
                 * @return bool
                 */
                private function ItalicFontFileExists()
                {
                    return file_exists($this->getItalicFontFile());
                }

                /**
                 * get italic font file
                 *
                 * @return string
                 */
                private function getItalicFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS
                    . $this->getItalicFont();
                }


                /**
                 * get the regular font path
                 *
                 * @return string
                 */
                private function getRegularFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_REGULAR_FONT
                    );
                }

                /**
                 * check whether font file exists for regular font
                 *
                 * @return bool
                 */
                private function regularFontFileExists()
                {
                    return file_exists($this->getRegularFontFile());
                }

                /**
                 * get the path to the font file for regular font
                 *
                 * @return string
                 */
                private function getRegularFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS
                    . $this->getRegularFont();
                }
            }

            + Size: 51,370 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php

            12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502
            <?php
            /**
             * This file is part of a FireGento e.V. module.
             *
             * This FireGento e.V. module is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2014 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             */

            /**
             * Abstract pdf model.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             */
            abstract class FireGento_Pdf_Model_Engine_Abstract
                extends Mage_Sales_Model_Order_Pdf_Abstract
            {
                /**
                 * @var array
                 */
                public $margin = array('left' => 45, 'right' => 540);
                /**
                 * @var array
                 */
                public $colors = array();
                /**
                 * @var string
                 */
                public $mode;
                /**
                 * @var string
                 */
                public $encoding;
                /**
                 * @var string
                 */
                public $pagecounter;
                /**
                 * @var mixed[]
                 */
                protected $_imprint;
                /**
                 * @var int correct all y values if the logo is full width and bigger than normal
                 */
                protected $_marginTop = 0;
                /**
                 * @var int
                 */
                private $defaultFontSize = 10;
                /**
                 * @var array
                 */
                private $_headerLines = array();

                public function __construct()
                {
                    parent::__construct();

                    $this->encoding = 'UTF-8';

                    $this->colors['black'] = new Zend_Pdf_Color_GrayScale(0);
                    $this->colors['grey1'] = new Zend_Pdf_Color_GrayScale(0.9);

                    $helper = Mage::helper('firegento_pdf');

                    $this->colors['text']   = $helper->getTextColor();
                    $this->colors['labels'] = $helper->getLabelColor();
                    $this->colors['header'] = $helper->getHeaderColor();
                    $this->colors['footer'] = $helper->getFooterColor();

                    // get the default imprint
                    $this->_imprint = Mage::getStoreConfig('general/imprint');
                }

                /**
                 * Draw one line
                 *
                 * @param  Zend_Pdf_Page $page         Current page object of Zend_Pdf
                 * @param  array         $draw         items to draw
                 * @param  array         $pageSettings page settings to use for new pages
                 *
                 * @return Zend_Pdf_Page
                 */
                public function drawLineBlocks(
                    Zend_Pdf_Page $page,
                    array $draw,
                    array $pageSettings = array()
                ) {
                    foreach ($draw as $itemsProp) {
                        if (!isset($itemsProp['lines']) || !is_array($itemsProp['lines'])) {
                            Mage::throwException(Mage::helper('sales')->__('Invalid draw line data. Please define "lines" array'));
                        }
                        $lines  = $itemsProp['lines'];
                        $height = isset($itemsProp['height']) ? $itemsProp['height'] : $this->defaultFontSize;

                        if (empty($itemsProp['shift'])) {
                            $shift = 0;
                            foreach ($lines as $line) {
                                $maxHeight = 0;
                                foreach ($line as $column) {
                                    $lineSpacing = !empty($column['height']) ? $column['height'] : $height;
                                    if (!is_array($column['text'])) {
                                        $column['text'] = array($column['text']);
                                    }
                                    $top = count($column['text']) * $lineSpacing;

                                    $maxHeight = $top > $maxHeight ? $top : $maxHeight;
                                }
                                $shift += $maxHeight;
                            }
                            $itemsProp['shift'] = $shift;
                        }

                        if ($this->y - $itemsProp['shift'] < 50
                            || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1
                                && $this->y - $itemsProp['shift'] < 100)
                        ) {
                            $page = $this->newPage($pageSettings);
                        }

                        foreach ($lines as $line) {
                            $maxHeight = 0;
                            foreach ($line as $column) {
                                $fontSize = empty($column['font_size']) ? 7
                                    : $column['font_size'];
                                if (!empty($column['font_file'])) {
                                    $font = Zend_Pdf_Font::fontWithPath($column['font_file']);
                                    $page->setFont($font, $fontSize);
                                } else {
                                    $fontStyle = empty($column['font']) ? 'regular' : $column['font'];
                                    switch ($fontStyle) {
                                        case 'bold':
                                            $font = $this->_setFontBold($page, $fontSize);
                                            break;
                                        case 'italic':
                                            $font = $this->_setFontItalic($page, $fontSize);
                                            break;
                                        default:
                                            $font = $this->_setFontRegular($page,
                                                $fontSize);
                                            break;
                                    }
                                }

                                if (!is_array($column['text'])) {
                                    $column['text'] = array($column['text']);
                                }

                                $lineSpacing = !empty($column['height']) ? $column['height'] : $height;
                                $top         = 0;
                                foreach ($column['text'] as $part) {
                                    $feed      = $column['feed'];
                                    $textAlign = empty($column['align']) ? 'left' : $column['align'];
                                    $width     = empty($column['width']) ? 0 : $column['width'];
                                    switch ($textAlign) {
                                        case 'right':
                                            if ($width) {
                                                $feed = $this->getAlignRight($part, $feed, $width, $font, $fontSize);
                                            } else {
                                                $feed -= $this->widthForStringUsingFontSize($part, $font, $fontSize);
                                            }
                                            break;
                                        case 'center':
                                            if ($width) {
                                                $feed = $this->getAlignCenter($part, $feed, $width, $font, $fontSize);
                                            }
                                            break;
                                    }
                                    if (isset($column['color'])) {
                                        $page->setFillColor($column['color']);
                                    }
                                    $page->drawText($part, $feed, $this->y - $top, 'UTF-8');
                                    $page->setFillColor($this->colors['text']);
                                    $top += $lineSpacing;
                                }

                                $maxHeight = $top > $maxHeight ? $top : $maxHeight;
                            }
                            $this->y -= $maxHeight;
                        }
                    }

                    return $page;
                }

                /**
                 * Set pdf mode.
                 *
                 * @param  string $mode set mode to differ between creditmemo, invoice, etc.
                 *
                 * @return FireGento_Pdf_Model_Engine_Abstract
                 */
                public function setMode($mode)
                {
                    $this->mode = $mode;

                    return $this;
                }

                /**
                 * Return pdf mode.
                 *
                 * @return string
                 */
                public function getMode()
                {
                    return $this->mode;
                }

                /**
                 * Set next line position
                 *
                 * @param  int $height Line-Height
                 *
                 * @return void
                 */
                protected function Ln($height = 15)
                {
                    $this->y -= $height;
                }

                /**
                 * Insert sender address bar
                 *
                 * @param  Zend_Pdf_Page $page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertSenderAddressBar($page)
                {
                    if (Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar') != '') {
                        $this->_setFontRegular($page, 6);
                        $page->setFillColor($this->colors['labels']);
                        $page->drawText(
                            trim(Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar')),
                            $this->margin['left'] + $this->getHeaderblockOffset(),
                            $this->y,
                            $this->encoding
                        );
                        $page->setFillColor($this->colors['text']);
                    }
                }

                /**
                 * Insert logo
                 *
                 * @param  Zend_Pdf_Page $page  Current page object of Zend_Pdf
                 * @param  mixed         $store store to get data from
                 *
                 * @return void
                 */
                protected function insertLogo(&$page, $store = null)
                {
                    if ($this->_isLogoFullWidth($store)) {
                        $this->_insertLogoFullWidth($page, $store);
                    } else {
                        $this->_insertLogoPositioned($page, $store);
                    }
                }

                /**
                 * is the setting to show the logo full width?
                 *
                 * @param  mixed $store store we want the config setting from
                 *
                 * @return bool
                 */
                protected function _isLogoFullWidth($store)
                {
                    return Mage::helper('firegento_pdf')->isLogoFullWidth($store);
                }

                /**
                 * Inserts the logo if it is positioned left, center or right.
                 *
                 * @param  Zend_Pdf_Page $page  Current page object of Zend_Pdf
                 * @param  mixed         $store store to get data from
                 *
                 * @return void
                 */
                protected function _insertLogoPositioned($page, $store = null)
                {
                    $imageRatio = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', $store);
                    $imageRatio = (empty($imageRatio)) ? 100 : $imageRatio;

                    $maxwidth  = ($this->margin['right'] - $this->margin['left']) * $imageRatio / 100;
                    $maxheight = 100;

                    $image = Mage::getStoreConfig('sales/identity/logo', $store);
                    if ($image and file_exists(Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image)) {
                        $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image;

                        list ($width, $height) = Mage::helper('firegento_pdf')->getScaledImageSize($image, $maxwidth, $maxheight);

                        if (is_file($image)) {
                            $image = Zend_Pdf_Image::imageWithPath($image);

                            $logoPosition = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', $store);

                            switch ($logoPosition) {
                                case 'center':
                                    $startLogoAt =
                                        $this->margin['left'] + (($this->margin['right'] - $this->margin['left']) / 2) - $width / 2;
                                    break;
                                case 'right':
                                    $startLogoAt = $this->margin['right'] - $width;
                                    break;
                                default:
                                    $startLogoAt = $this->margin['left'];
                            }

                            $position['x1'] = $startLogoAt;
                            $position['y1'] = 720;
                            $position['x2'] = $position['x1'] + $width;
                            $position['y2'] = $position['y1'] + $height;

                            $page->drawImage($image, $position['x1'], $position['y1'], $position['x2'], $position['y2']);
                        }
                    }
                }

                /**
                 * inserts the logo from complete left to right
                 *
                 * @param Zend_Pdf_Page $page  current Zend_Pdf_Page object
                 * @param mixed         $store store we need the config setting from
                 *
                 * @todo merge _insertLogoPositioned and _insertLogoFullWidth
                 */
                protected function _insertLogoFullWidth($page, $store = null)
                {
                    $imageRatio = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', $store);
                    $imageRatio = (empty($imageRatio)) ? 1 : $imageRatio;

                    $maxwidth  = 594 * $imageRatio / 100;
                    $maxheight = 300;

                    $image = Mage::getStoreConfig('sales/identity/logo', $store);
                    if ($image and file_exists(Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image)) {
                        $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image;

                        list ($width, $height) = Mage::helper('firegento_pdf')->getScaledImageSize($image, $maxwidth, $maxheight);

                        if (is_file($image)) {
                            $image = Zend_Pdf_Image::imageWithPath($image);

                            $logoPosition = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', $store);

                            switch ($logoPosition) {
                                case 'center':
                                    $startLogoAt =
                                        $this->margin['left'] + (($this->margin['right'] - $this->margin['left']) / 2) - $width / 2;
                                    break;
                                case 'right':
                                    $startLogoAt = $this->margin['right'] - $width;
                                    break;
                                default:
                                    $startLogoAt = 0;
                            }

                            $position['x1'] = $startLogoAt;
                            $position['y1'] = 663;
                            $position['x2'] = $position['x1'] + $width;
                            $position['y2'] = $position['y1'] + $height;

                            $page->drawImage($image, $position['x1'], $position['y1'], $position['x2'], $position['y2']);
                            $this->_marginTop = $height - 130;
                        }
                    }
                }

                /**
                 * insert customer address and all header like customer number, etc.
                 *
                 * @param Zend_Pdf_Page             $page   current Zend_Pdf_Page
                 * @param Mage_Sales_Model_Abstract $source source for the address information
                 * @param Mage_Sales_Model_Order    $order  order to print the document for
                 */
                protected function insertAddressesAndHeader(
                    Zend_Pdf_Page $page,
                    Mage_Sales_Model_Abstract $source,
                    Mage_Sales_Model_Order $order
                ) {
                    // Add logo
                    $this->insertLogo($page, $source->getStore());

                    // Add billing address
                    $this->y = 692 - $this->_marginTop;
                    $this->_insertCustomerAddress($page, $order);

                    // Add sender address
                    $this->y = 705 - $this->_marginTop;
                    $this->_insertSenderAddressBar($page);

                    // Add head
                    // make sure that header does not overlap address bar
                    $headOffset = 0;
                    if ($this->y > 592 - $this->_marginTop) {
                        $headOffset = 40;
                    }
                    $this->y = 592 - $headOffset - $this->_marginTop;
                    $this->insertHeader($page, $order, $source);

                    /* Add table head */
                    // make sure that item table does not overlap heading
                    if ($this->y > 575 - $headOffset - $this->_marginTop) {
                        $this->y = 575 - $headOffset - $this->_marginTop;
                    }
                }

                /**
                 * Inserts the customer address. The default address is the billing address.
                 *
                 * @param  Zend_Pdf_Page          $page  Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order Order object
                 *
                 * @return void
                 */
                protected function _insertCustomerAddress($page, $order)
                {
                    $this->_setFontRegular($page, 9);
                    $billing = $this->_formatAddress($order->getBillingAddress()->format('pdf'));
                    foreach ($billing as $line) {
                        $page->drawText(trim(strip_tags($line)),
                            $this->margin['left'] + $this->getHeaderblockOffset(),
                            $this->y,
                            $this->encoding);
                        $this->Ln(12);
                    }
                }

                /**
                 * get the offset to position the address block left or right
                 *
                 * @return int
                 */
                protected function getHeaderblockOffset()
                {
                    $position = Mage::getStoreConfig('sales_pdf/firegento_pdf/headerblocks_position');
                    $left     = FireGento_Pdf_Model_System_Config_Source_Headerblocks::LEFT;
                    return $position === $left ? 0 : 315;
                }


                /**
                 * Insert Header
                 *
                 * @param  Zend_Pdf_Page          $page     Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order    Order object
                 * @param  object                 $document Document object
                 *
                 * @return void
                 */
                protected function insertHeader($page, $order, $document)
                {
                    $this->_headerLines = array();
                    $page->setFillColor($this->colors['text']);

                    $mode = $this->getMode();

                    $this->_setFontBold($page, 15);

                    $title = 'Invoice';
                    if ($mode === 'creditmemo') {
                        $title = 'Creditmemo';
                    } elseif ($mode === 'shipment') {
                        $title = 'Packingslip';
                    }

                    $page->drawText(Mage::helper('firegento_pdf')->__($title), $this->margin['left'], $this->y, $this->encoding);

                    $this->y += 80;
                    $width   = 80;

                    $color     = $this->colors['black'];
                    $fillColor = $this->colors['black'];
                    $fontSize  = null;
                    $bold      = false;

                    // Invoice/shipment/creditmemo Number
                    $numberTitle = 'Invoice number:';
                    if ($mode === 'creditmemo') {
                        $numberTitle = 'Creditmemo number:';
                    } elseif ($mode === 'shipment') {
                        $numberTitle = 'Shipment number:';
                    }

                    $this->_headerLines[] = array(
                        'content'  => array(
                            'label' => Mage::helper('firegento_pdf')->__($numberTitle),
                            'value' => $document->getIncrementId(),
                        ),
                        'fontSize' => $fontSize,
                        'bold'     => $bold,
                    );

                    // Order Number
                    $putOrderId = $this->_putOrderId($order);
                    if ($putOrderId) {
                        $this->_headerLines[] = array(
                            'content'  => array(
                                'label' => Mage::helper('firegento_pdf')->__('Order number:'),
                                'value' => $putOrderId,
                            ),
                            'fontSize' => $fontSize,
                            'bold'     => $bold,
                        );
                    }

                    // Customer Number
                    if ($this->_showCustomerNumber($order->getStore())) {
                        $customerNumber          = $this->_getGuestorderCustomerNo($order->getStore());
                        $customerNumberFieldName =
                            Mage::getStoreConfig('sales_pdf/invoice/customer_number_field', $order->getStoreId());
                        if ($customerNumberFieldName
                            === FireGento_Pdf_Model_System_Config_Source_Customer_Number::CUSTOMER_NUMBER_FIELD_INCREMENT_ID) {
                            try {
                                $customer       = Mage::getModel('customer/customer')->load($order->getData('customer_id'));
                                $customerNumber = $customer->getData($customerNumberFieldName);
                            } catch (\Exception $e) {
                                Mage::logException($e);
                                //Use default
                                $customerNumber = $order->getCustomerId();
                            }
                        } else {
                            //Use default 'entity_id'
                            $customerNumber = $order->getCustomerId();
                        }

                        if ($order->getCustomerId() !== '') {
                            $prefix = Mage::getStoreConfig('sales_pdf/invoice/customeridprefix');

                            if (!empty($prefix)) {
                                $customerId = $prefix . $customerNumber;
                            } else {
                                $customerId = $customerNumber;
                            }
                        }

                        if ($customerId !== '') {
                            $this->_headerLines[] = array(
                                'content'  => array(
                                    'label' => Mage::helper('firegento_pdf')->__('Customer number:'),
                                    'value' => $customerId,
                                ),
                                'fontSize' => $fontSize,
                                'bold'     => $bold,
                            );
                        }
                    }

                    /** print VAT ID */
                    if ($this->_showCustomerVATNumber($order->getStore())) {
                        if ($order->getBillingAddress()->getVatId()) {
                            $customerVatId = $order->getBillingAddress()->getVatId();
                        } elseif ($order->getCustomerTaxvat()) {
                            $customerVatId = $order->getCustomerTaxvat();
                        } else {
                            $customerVatId = '-';
                        }

                        $this->_headerLines[] = array(
                            'content'  => array(
                                'label' => Mage::helper('firegento_pdf')->__('VAT-ID:'),
                                'value' => $customerVatId,
                            ),
                            'fontSize' => $fontSize,
                            'bold'     => $bold,
                        );
                    }
                    /** end VAT ID print*/

                    // Customer IP
                    if (!Mage::getStoreConfigFlag('sales/general/hide_customer_ip', $order->getStoreId())) {
                        $customerIp           = $order->getData('remote_ip');
                        $this->_headerLines[] = array(
                            'content'  => array(
                                'label' => Mage::helper('firegento_pdf')->__('Customer IP:'),
                                'value' => $customerIp,
                            ),
                            'fontSize' => $fontSize,
                            'bold'     => $bold,
                        );
                    }

                    $this->_headerLines[] = array(
                        'content'  => array(
                            'label' => Mage::helper('firegento_pdf')->__(($mode == 'invoice') ? 'Invoice date:'
                                : 'Date:'),
                            'value' => Mage::helper('core')->formatDate($document->getCreatedAtDate(), 'medium', false),
                        ),
                        'fontSize' => $fontSize,
                        'bold'     => $bold,
                    );

                    // Payment method.
                    $posHeader        = FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_HEADER;
                    $payomentInHeader = Mage::getStoreConfig('sales_pdf/invoice/payment_method_position') === $posHeader;
                    $putPaymentMethod = ($mode === 'invoice' && $payomentInHeader);

                    if ($putPaymentMethod) {
                        $font = $bold ?
                            $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize)
                            : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize);

                        $paymentMethodArray =
                            $this->_prepareText($order->getPayment()->getMethodInstance()->getTitle(), $page, $font,
                                $this->defaultFontSize, $width);

                        $this->_headerLines[] = array(
                            'content'  => array(
                                'label' => Mage::helper('firegento_pdf')->__('Payment method:'),
                                'value' => array_shift($paymentMethodArray),
                            ),
                            'fontSize' => $fontSize,
                            'bold'     => $bold,
                        );

                        $paymentMethodArray = $this->_prepareText(implode(' ', $paymentMethodArray), $page, $font,
                            $this->defaultFontSize, 2 * $width);
                        foreach ($paymentMethodArray as $methodString) {
                            $this->_headerLines[] = array(
                                'content'  => array(
                                    'label' => $methodString,
                                ),
                                'fontSize' => $fontSize,
                                'bold'     => $bold,
                            );
                        }
                    }

                    // Shipping method.
                    $invoiceAndShippingHeader  = $mode == 'invoice'
                        && Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position')
                        === FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER;
                    $shipmentAndShippingHeader = $mode == 'shipment'
                        && Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position')
                        === FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER;
                    if (($invoiceAndShippingHeader || $shipmentAndShippingHeader) && $order->getIsNotVirtual()) {
                        $font = $bold ?
                            $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize)
                            : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize);
                        $shippingMethodArray  = $this->_prepareText($order->getShippingDescription(), $page, $font,
                            $this->defaultFontSize, $width);
                        $shippingMethod       = array_shift($shippingMethodArray);
                        $this->_headerLines[] = array(
                            'content'  => array(
                                'label' => Mage::helper('firegento_pdf')->__('Shipping method:'),
                                'value' => $shippingMethod,
                            ),
                            'fontSize' => $fontSize,
                            'bold'     => $bold,
                        );

                        $font = $bold ?
                            $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize)
                            : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize);

                        $shippingMethodArray =
                            $this->_prepareText(implode(" ", $shippingMethodArray), $page, $font, $this->defaultFontSize,
                                2 * $width);
                        foreach ($shippingMethodArray as $methodString) {
                            $this->_headerLines[] = array(
                                'content'  => array(
                                    'label' => $methodString,
                                ),
                                'fontSize' => $fontSize,
                                'bold'     => $bold,
                            );
                        }
                    }

                    $transportObject = new Varien_Object();
                    $transportObject->setData(array('lines' => $this->headerLines));
                    Mage::dispatchEvent(
                        'firegento_pdf_header_lines',
                        array('headerLines' => $transportObject)
                    );
                    Mage::dispatchEvent(
                        'firegento_pdf_' . $this->getMode() . '_header_lines',
                        array('headerLines' => $transportObject)
                    );
                    $this->headerLines = $transportObject->getData('lines');
                    $helper            = Mage::helper('firegento_pdf');
                    foreach ($this->_headerLines as $line) {
                        $font = $this->setFont($line, $page);
                        foreach ($line['content'] as $key => $c) {
                            if ($key === 'label') {
                                $page->setFillColor($helper->getLabelColor());
                                $offset = ($this->margin['right'] - 180 - $this->getHeaderblockOffset());
                            } else {
                                $page->setFillColor($helper->getTextColor());
                                $offset = $this->margin['right'] - 10 - $this->getHeaderblockOffset()
                                    - $this->widthForStringUsingFontSize($c, $font, 10);
                            }

                            $page->drawText(
                                $c,
                                $offset,
                                $this->y,
                                $this->encoding
                            );
                        }
                        $this->Ln();
                    }
                    $this->y -= (count($this->_headerLines) * 2);
                }

                /**
                 * @param array $line
                 * @param™ Zend_Pdf_Page $page
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function setFont(array $line, Zend_Pdf_Page $page)
                {
                    if ($line['fontSize'] === null) {
                        $line['fontSize'] = $this->defaultFontSize;
                    }
                    $font = $this->_setFontRegular($page, $line['fontSize']);
                    if ($line['bold']) {
                        $font = $this->_setFontBold($page, $line['fontSize']);
                    }
                    return $font;
                }

                /**
                 * Return the order id or false if order id should not be displayed on document.
                 *
                 * @param  Mage_Sales_Model_Order $order order to get id from
                 *
                 * @return int|false
                 */
                protected function _putOrderId($order)
                {
                    return Mage::helper('firegento_pdf')->putOrderId($order, $this->mode);
                }

                /**
                 * do we show the customber number on this document
                 *
                 * @param  mixed $store store from whom we need the config setting
                 *
                 * @return bool
                 */
                protected function _showCustomerNumber($store)
                {
                    return Mage::helper('firegento_pdf')
                        ->showCustomerNumber($this->mode, $store);
                }

                /**
                 * do we show the customber VAT number on this document
                 *
                 * @param  mixed $store store from whom we need the config setting
                 *
                 * @return bool
                 */
                protected function _showCustomerVATNumber($store)
                {
                    return Mage::helper('firegento_pdf')
                        ->showCustomerVATNumber($this->mode, $store);
                }

                /**
                 * which customer number should be displayed for guest orders
                 *
                 * @param  mixed $store store from whom we need the config setting
                 *
                 * @return string
                 */
                protected function _getGuestorderCustomerNo($store)
                {
                    return Mage::helper('firegento_pdf')
                        ->getGuestorderCustomerNo($this->mode, $store);
                }

                /**
                 * Generate new PDF page.
                 *
                 * @param  array $settings Page settings
                 *
                 * @return Zend_Pdf_Page
                 */
                public function newPage(array $settings = array())
                {
                    $pdf = $this->_getPdf();

                    $page = $pdf->newPage($this->getPageSize());
                    $this->pagecounter++;
                    $pdf->pages[] = $page;

                    $this->_addFooter($page, Mage::app()->getStore());

                    // set the font because it may not be set, see https://github.com/firegento/firegento-pdf/issues/184
                    $this->_setFontRegular($page, 9);

                    // provide the possibility to add random stuff to the page
                    Mage::dispatchEvent(
                        'firegento_pdf_' . $this->getMode() . '_edit_page',
                        array('page' => $page, 'order' => $this->getOrder())
                    );

                    $this->y = 800;
                    $this->_setFontRegular($page, 9);

                    return $page;
                }

                /**
                 * Draw
                 *
                 * @param  Varien_Object          $item     creditmemo/shipping/invoice to draw
                 * @param  Zend_Pdf_Page          $page     Current page object of Zend_Pdf
                 * @param  Mage_Sales_Model_Order $order    order to get infos from
                 * @param  int                    $position position in table
                 *
                 * @return Zend_Pdf_Page
                 */
                protected function _drawItem(
                    Varien_Object $item,
                    Zend_Pdf_Page $page,
                    Mage_Sales_Model_Order $order,
                    $position = 1
                ) {
                    $type = $item->getOrderItem()->getProductType();

                    $renderer = $this->_getRenderer($type);
                    $renderer->setOrder($order);
                    $renderer->setItem($item);
                    $renderer->setPdf($this);
                    $renderer->setPage($page);
                    $renderer->setRenderedModel($this);

                    $renderer->draw($position);

                    return $renderer->getPage();
                }

                /**
                 * Insert Totals Block
                 *
                 * @param  object $page   Current page object of Zend_Pdf
                 * @param  object $source Fields of footer
                 *
                 * @return Zend_Pdf_Page
                 */
                protected function insertTotals($page, $source)
                {
                    $this->y -= 15;

                    $order = $source->getOrder();

                    $totalTax          = 0;
                    $shippingTaxRate   = 0;
                    $shippingTaxAmount = $order->getShippingTaxAmount();

                    if ($shippingTaxAmount > 0) {
                        $shippingTaxRate
                            = $order->getShippingTaxAmount() * 100
                            / ($order->getShippingInclTax()
                                - $order->getShippingTaxAmount());
                    }

                    $groupedTax = array();

                    $items['items'] = array();
                    foreach ($source->getAllItems() as $item) {
                        if ($item->getOrderItem()->getParentItem()) {
                            continue;
                        }
                        $items['items'][] = $item->getOrderItem()->toArray();
                    }

                    array_push(
                        $items['items'], array(
                            'row_invoiced'     => $order->getShippingInvoiced(),
                            'tax_inc_subtotal' => false,
                            'tax_percent'      => $shippingTaxRate,
                            'tax_amount'       => $shippingTaxAmount,
                        )
                    );

                    foreach ($items['items'] as $item) {
                        $_percent = null;
                        if (!isset($item['tax_amount'])) {
                            $item['tax_amount'] = 0;
                        }
                        if (!isset($item['row_invoiced'])) {
                            $item['row_invoiced'] = 0;
                        }
                        if (!isset($item['price'])) {
                            $item['price'] = 0;
                        }
                        if (!isset($item['tax_inc_subtotal'])) {
                            $item['tax_inc_subtotal'] = 0;
                        }
                        if (((float)$item['tax_amount'] > 0)
                            && ((float)$item['row_invoiced'] > 0)
                        ) {
                            $_percent = round($item["tax_percent"], 0);
                        }
                        if (!array_key_exists('tax_inc_subtotal', $item)
                            || $item['tax_inc_subtotal']
                        ) {
                            $totalTax += $item['tax_amount'];
                        }
                        if (($item['tax_amount']) && $_percent) {
                            if (!array_key_exists((int)$_percent, $groupedTax)) {
                                $groupedTax[$_percent] = $item['tax_amount'];
                            } else {
                                $groupedTax[$_percent] += $item['tax_amount'];
                            }
                        }
                    }

                    $totals = $this->_getTotalsList($source);

                    $lineBlock = array(
                        'lines'  => array(),
                        'height' => 20,
                    );

                    foreach ($totals as $total) {
                        $total->setOrder($order)->setSource($source);

                        if ($total->canDisplay()) {
                            $total->setFontSize($this->defaultFontSize);
                            // fix Magento 1.8 bug, so that taxes for shipping do not appear twice
                            // see https://github.com/firegento/firegento-pdf/issues/106
                            $uniqueTotalsForDisplay = array_map(
                                'unserialize', array_unique(array_map('serialize',
                                    $total->getTotalsForDisplay()))
                            );
                            foreach ($uniqueTotalsForDisplay as $totalData) {
                                $label                = $this->fixNumberFormat($totalData['label']);
                                $lineBlock['lines'][] = array(
                                    array(
                                        'text'      => $label,
                                        'feed'      => $this->margin['right'] - 70,
                                        'align'     => 'right',
                                        'font_size' => $totalData['font_size'],
                                    ),
                                    array(
                                        'text'      => $totalData['amount'],
                                        'feed'      => $this->margin['right'],
                                        'align'     => 'right',
                                        'font_size' => $totalData['font_size'],
                                    ),
                                );
                            }
                        }
                    }
                    $page = $this->drawLineBlocks($page, array($lineBlock));

                    return $page;
                }


                /**
                 * Insert Notes
                 *
                 * @param  Zend_Pdf_Page             $page  Current Page Object of Zend_PDF
                 * @param  Mage_Sales_Model_Order    $order order to get note from
                 * @param  Mage_Sales_Model_Abstract $model invoice/shipment/creditmemo
                 *
                 * @return \Zend_Pdf_Page
                 */
                protected function _insertNote($page, $order, $model)
                {
                    $fontSize = $this->defaultFontSize;
                    $font     = $this->_setFontRegular($page, $fontSize);
                    $this->y  -= 60;

                    $notes  = array();
                    $result = new Varien_Object();
                    $result->setNotes($notes);
                    Mage::dispatchEvent(
                        'firegento_pdf_' . $this->getMode() . '_insert_note',
                        array(
                            'order'          => $order,
                            $this->getMode() => $model,
                            'result'         => $result,
                        )
                    );
                    $notes = array_merge($notes, $result->getNotes());

                    // Get free text notes.
                    $note = Mage::getStoreConfig('sales_pdf/' . $this->getMode() . '/note');
                    if (!empty($note)) {
                        $tmpNotes = explode("\n", $note);
                        $notes    = array_merge($notes, $tmpNotes);
                    }

                    // Draw notes on PDF.
                    foreach ($notes as $note) {
                        // prepare the text so that it fits to the paper
                        foreach ($this->_prepareText($note, $page, $font, $this->defaultFontSize) as $tmpNote) {
                            // create a new page if necessary
                            if ($this->y < 50
                                || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1
                                    && $this->y < 100)
                            ) {
                                $page    = $this->newPage(array());
                                $this->y = $this->y - 60;
                                $font    = $this->_setFontRegular($page, $fontSize);
                            }
                            $page->drawText($tmpNote, $this->margin['left'], $this->y + 30, $this->encoding);
                            $this->Ln();
                        }
                    }

                    return $page;
                }


                /**
                 * draw footer on pdf
                 *
                 * @param Zend_Pdf_Page $page  page to draw on
                 * @param mixed         $store store to get infos from
                 */
                protected function _addFooter($page, $store = null)
                {
                    // get the imprint of the store if a store is set
                    if (!empty($store)) {
                        $imprintObject = new Varien_Object();
                        $imprintObject->setImprint(Mage::getStoreConfig('general/imprint',
                            $store));
                        Mage::dispatchEvent('firegento_pdf_imprint_load_after', array(
                                'transport_object' => $imprintObject,
                            )
                        );
                        $this->_imprint = $imprintObject->getImprint();
                    }

                    // Add footer if GermanSetup is installed.
                    if ($this->_imprint
                        && Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1
                    ) {
                        $this->y = 110;
                        $this->_insertFooter($page);

                        // Add page counter.
                        $this->y = 110;
                        $this->_insertPageCounter($page);
                    }
                }

                /**
                 * Insert footer
                 *
                 * @param  Zend_Pdf_Page $page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertFooter($page)
                {
                    $page->setLineColor($this->colors['footer']);
                    $page->setFillColor($this->colors['footer']);
                    $page->setLineWidth(0.5);
                    $page->drawLine($this->margin['left'] - 20, $this->y - 5,
                        $this->margin['right'] + 30, $this->y - 5);

                    $this->Ln(15);
                    $this->_insertFooterAddress($page);

                    $fields = array(
                        'telephone' => Mage::helper('firegento_pdf')->__('Telephone:'),
                        'fax'       => Mage::helper('firegento_pdf')->__('Fax:'),
                        'email'     => Mage::helper('firegento_pdf')->__('E-Mail:'),
                        'web'       => Mage::helper('firegento_pdf')->__('Web:'),
                    );
                    $this->_insertFooterBlock($page, $fields, 70, 40, 140);

                    $fields = array(
                        'bank_name'          => Mage::helper('firegento_pdf')->__('Bank name:'),
                        'bank_account'       => Mage::helper('firegento_pdf')->__('Account:'),
                        'bank_code_number'   => Mage::helper('firegento_pdf')->__('Bank number:'),
                        'bank_account_owner' => Mage::helper('firegento_pdf')->__('Account owner:'),
                        'swift'              => Mage::helper('firegento_pdf')->__('SWIFT:'),
                        'iban'               => Mage::helper('firegento_pdf')->__('IBAN:'),
                    );
                    $this->_insertFooterBlock($page, $fields, 215, 50, 150);

                    $fields = array(
                        'tax_number'      => Mage::helper('firegento_pdf')->__('Tax number:'),
                        'vat_id'          => Mage::helper('firegento_pdf')->__('VAT-ID:'),
                        'register_number' => Mage::helper('firegento_pdf')->__('Register number:'),
                        'ceo'             => Mage::helper('firegento_pdf')->__('CEO:'),
                        'city'            => Mage::helper('firegento_pdf')->__('Registered seat:'),
                        'court'           => Mage::helper('firegento_pdf')->__('Register court:'),
                    );
                    $this->_insertFooterBlock($page, $fields, 365, 60, $this->margin['right'] - 375 - 10);

                    $page->setLineColor($this->colors['black']);
                    $page->setFillColor($this->colors['text']);
                }

                /**
                 * Insert footer block
                 *
                 * @param  Zend_Pdf_Page $page        Current page object of Zend_Pdf
                 * @param  array         $fields      Fields of footer
                 * @param  int           $colposition Starting colposition
                 * @param  int           $valadjust   Margin between label and value
                 * @param  int           $colwidth    the width of this footer block - text will be wrapped if it is broader
                 *                                    than this width
                 *
                 * @return void
                 */
                protected function _insertFooterBlock(
                    $page,
                    $fields,
                    $colposition = 0,
                    $valadjust = 30,
                    $colwidth = null
                ) {
                    $fontSize = 7;
                    $font     = $this->_setFontRegular($page, $fontSize);
                    $y        = $this->y;

                    $valposition = $colposition + $valadjust;

                    if (is_array($fields)) {
                        foreach ($fields as $field => $label) {
                            if (empty($this->_imprint[$field])) {
                                continue;
                            }
                            // draw the label
                            $page->drawText($label, $this->margin['left'] + $colposition, $y, $this->encoding);
                            // prepare the value: wrap it if necessary
                            $val   = $this->_imprint[$field];
                            $width = $colwidth;
                            if (!empty($colwidth)) {
                                // calculate the maximum width for the value
                                $width = $this->margin['left'] + $colposition + $colwidth - ($this->margin['left'] + $valposition);
                            }
                            foreach ($this->_prepareText($val, $page, $font, $fontSize, $width) as $tmpVal) {
                                $page->drawText($tmpVal, $this->margin['left'] + $valposition, $y, $this->encoding);
                                $y -= 12;
                            }
                        }
                    }
                }

                /**
                 * Insert address of store owner
                 *
                 * @param  Zend_Pdf_Page $page  Current page object of Zend_Pdf
                 * @param  mixed         $store store to get info from
                 *
                 * @return void
                 */
                protected function _insertFooterAddress($page, $store = null)
                {
                    $fontSize = 7;
                    $font     = $this->_setFontRegular($page, $fontSize);
                    $y        = $this->y;
                    $address  = '';

                    foreach ($this->_prepareText($this->_imprint['company_first'], $page, $font, $fontSize, 90) as $company1st) {
                        $address .= $company1st . "\n";
                    }

                    if (array_key_exists('company_second', $this->_imprint)) {
                        foreach ($this->_prepareText($this->_imprint['company_second'], $page, $font, $fontSize, 90) as $company2nd)
                        {
                            $address .= $company2nd . "\n";
                        }
                    }

                    if (array_key_exists('street', $this->_imprint)) {
                        $address .= $this->_imprint['street'] . "\n";
                    }
                    if (array_key_exists('zip', $this->_imprint)) {
                        $address .= $this->_imprint['zip'] . " ";
                    }
                    if (array_key_exists('city', $this->_imprint)) {
                        $address .= $this->_imprint['city'] . "\n";
                    }

                    if (!empty($this->_imprint['country'])) {
                        $countryName = Mage::getModel('directory/country')->loadByCode($this->_imprint['country'])->getName();
                        $address     .= Mage::helper('core')->__($countryName);
                    }

                    foreach (explode("\n", $address) as $value) {
                        if ($value !== '') {
                            $page->drawText(trim(strip_tags($value)), $this->margin['left'] - 20, $y, $this->encoding);
                            $y -= 12;
                        }
                    }
                }


                /**
                 * Insert page counter
                 *
                 * @param  Zend_Pdf_Page $page Current page object of Zend_Pdf
                 *
                 * @return void
                 */
                protected function _insertPageCounter($page)
                {
                    $font = $this->_setFontRegular($page, 9);
                    $page->setFillColor($this->colors['labels']);
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Page') . ' ' . $this->pagecounter,
                        $this->margin['right'] - 23 - $this->widthForStringUsingFontSize($this->pagecounter, $font, 9),
                        $this->y,
                        $this->encoding
                    );
                    $page->setFillColor($this->colors['text']);
                }

                /**
                 * get stanard font
                 *
                 * @return Zend_Pdf_Resource_Font the regular font
                 */
                public function getFontRegular()
                {
                    if ($this->getRegularFont() && $this->regularFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getRegularFontFile());
                    }

                    return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
                }

                /**
                 * Set default font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontRegular($object, $size = 10)
                {
                    $font = $this->getFontRegular();
                    $object->setFont($font, $size);

                    return $font;
                }

                /**
                 * get default bold font
                 *
                 * @return Zend_Pdf_Resource_Font the bold font
                 */
                public function getFontBold()
                {
                    if ($this->getBoldFont() && $this->boldFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getBoldFontFile());
                    }

                    return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD);
                }

                /**
                 * Set bold font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontBold($object, $size = 10)
                {
                    $font = $this->getFontBold();
                    $object->setFont($font, $size);

                    return $font;
                }

                /**
                 * get italic font
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                public function getFontItalic()
                {
                    if ($this->getItalicFont() && $this->italicFontFileExists()) {
                        return Zend_Pdf_Font::fontWithPath($this->getItalicFontFile());
                    }

                    return Zend_Pdf_Font::fontWithName(
                        Zend_Pdf_Font::FONT_HELVETICA_ITALIC
                    );
                }

                /**
                 * Set italic font
                 *
                 * @param  Zend_Pdf_Page $object Current page object of Zend_Pdf
                 * @param  string|int    $size   Font size
                 *
                 * @return Zend_Pdf_Resource_Font
                 */
                protected function _setFontItalic($object, $size = 10)
                {
                    $font = $this->getFontItalic();
                    $object->setFont($font, $size);

                    return $font;
                }

                /**
                 * Prepares the text so that it fits to the given page's width.
                 *
                 * @param  string                 $text     the text which should be prepared
                 * @param  Zend_Pdf_Page          $page     the page on which the text will be rendered
                 * @param  Zend_Pdf_Resource_Font $font     the font with which the text will be rendered
                 * @param  int                    $fontSize the font size with which the text will be rendered
                 * @param  int                    $width    [optional] the width for the given text, defaults to the page width
                 *
                 * @return array the given text in an array where each item represents a new line
                 */
                public function _prepareText($text, $page, $font, $fontSize, $width = null)
                {
                    if (empty($text)) {
                        return array();
                    }
                    $lines       = '';
                    $currentLine = '';
                    // calculate the page's width with respect to the margins
                    if (empty($width)) {
                        $width
                            = $page->getWidth() - $this->margin['left'] - ($page->getWidth()
                                - $this->margin['right']);
                    }
                    // regular expression that splits on whitespaces and dashes based on http://stackoverflow.com/a/11758732/719023
                    $textChunks = preg_split('/([^\s-]+[\s-]+)/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
                    foreach ($textChunks as $textChunk) {
                        $textChunk = trim($textChunk);
                        if ($this->widthForStringUsingFontSize($currentLine . ' '
                                . $textChunk, $font, $fontSize) < $width
                        ) {
                            // do not add whitespace on first line
                            if (!empty($currentLine)) {
                                $currentLine .= ' ';
                            }
                            $currentLine .= $textChunk;
                        } else {
                            // text is too broad, so add new line character
                            $lines       .= $currentLine . "\n";
                            $currentLine = $textChunk;
                        }
                    }
                    // append the last line
                    $lines .= $currentLine;

                    return explode("\n", $lines);
                }

                /**
                 * Fix the percentage for taxes which come with four decimal places
                 * from magento core.
                 *
                 * @param  string $label tax label which contains the badly formatted tax percentage
                 *
                 * @return string
                 */
                protected function fixNumberFormat($label)
                {
                    $pattern = "/(.*)\((\d{1,2}\.\d{4}%)\)/";
                    if (preg_match($pattern, $label, $matches)) {
                        $percentage = Zend_Locale_Format::toNumber(
                            $matches[2],
                            array(
                                'locale'    => Mage::app()->getLocale()->getLocale(),
                                'precision' => 2,
                            )
                        );

                        return $matches[1] . '(' . $percentage . '%)';
                    }

                    return $label;
                }

                /**
                 * get bold font file
                 *
                 * @return string
                 */
                protected function getBoldFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS
                        . $this->getBoldFont();
                }

                /**
                 * get bold font path
                 *
                 * @return string
                 */
                protected function getBoldFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_BOLD_FONT
                    );
                }

                /**
                 * check whether font file exists for bold font
                 *
                 * @return bool
                 */
                protected function boldFontFileExists()
                {
                    return file_exists($this->getBoldFontFile());
                }

                /**
                 * get italic font path
                 *
                 * @return string
                 */
                protected function getItalicFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_ITALIC_FONT
                    );
                }

                /**
                 * check whether italic font file exists
                 *
                 * @return bool
                 */
                protected function ItalicFontFileExists()
                {
                    return file_exists($this->getItalicFontFile());
                }

                /**
                 * get italic font file
                 *
                 * @return string
                 */
                protected function getItalicFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS . $this->getItalicFont();
                }

                /**
                 * get the regular font path
                 *
                 * @return string
                 */
                protected function getRegularFont()
                {
                    return Mage::getStoreConfig(
                        FireGento_Pdf_Helper_Data::XML_PATH_REGULAR_FONT
                    );
                }

                /**
                 * check whether font file exists for regular font
                 *
                 * @return bool
                 */
                protected function regularFontFileExists()
                {
                    return file_exists($this->getRegularFontFile());
                }

                /**
                 * get the path to the font file for regular font
                 *
                 * @return string
                 */
                protected function getRegularFontFile()
                {
                    return Mage::helper('firegento_pdf')->getFontPath() . DS
                        . $this->getRegularFont();
                }

                /**
                 * @return string
                 */
                private function getPageSize()
                {
                    return Mage::helper('firegento_pdf')->getPageSizeConfigPath();
                }
            }

            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xhtml index bf1ab0d..105a247 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Default.php

            Source of file Default.php

            - Size: 6,444 Bytes - Last Modified: 2014-10-26T15:22:24+01:00

            /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php

            123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
            <?php
            /**
             * This file is part of the FIREGENTO project.
             *
             * FireGento_Pdf is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */
            /**
             * Creditmemo model rewrite.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2013 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             * @version   $Id:$
             * @since     0.1.0
             */
            class FireGento_Pdf_Model_Engine_Creditmemo_Default extends FireGento_Pdf_Model_Engine_Abstract
            {

                /**
                 * constructor to set mode to creditmemo
                 */
                public function __construct()
                {
                    parent::__construct();
                    $this->setMode('creditmemo');
                }

                /**
                 * Return PDF document
                 *
                 * @param  array $creditmemos creditmemos to generate pdfs for
                 *
                 * @return Zend_Pdf
                 */
                public function getPdf($creditmemos = array())
                {
                    $this->_beforeGetPdf();
                    $this->_initRenderer('creditmemo');

                    $pdf = new Zend_Pdf();
                    $this->_setPdf($pdf);

                    foreach ($creditmemos as $creditmemo) {
                        // pagecounter is 0 at the beginning, because it is incremented in newPage()
                        $this->pagecounter = 0;
                        if ($creditmemo->getStoreId()) {
                            Mage::app()->getLocale()->emulate($creditmemo->getStoreId());
                            Mage::app()->setCurrentStore($creditmemo->getStoreId());
                        }
                        $order = $creditmemo->getOrder();
                        $this->setOrder($order);

                        $page = $this->newPage(array());

                        $this->insertAddressesAndHeader($page, $creditmemo, $order);

                        $this->_setFontRegular($page, 9);
                        $this->_drawHeader($page);

                        $this->y -= 20;

                        $position = 0;

                        foreach ($creditmemo->getAllItems() as $item) {
                            if ($item->getOrderItem()->getParentItem()) {
                                continue;
                            }
                            /* Draw item */
                            $position++;
                            $this->_drawItem($item, $page, $order, $position);
                            $page = end($pdf->pages);
                        }

                        /* add line after items */
                        $page->drawLine($this->margin['left'], $this->y + 5, $this->margin['right'], $this->y + 5);

                        /* Add totals */
                        $page = $this->insertTotals($page, $creditmemo);

                        /* add note */
                        $page = $this->_insertNote($page, $order, $creditmemo);

                        // Add footer
                        $this->_addFooter($page, $creditmemo->getStore());
                    }

                    $this->_afterGetPdf();

                    if ($creditmemo->getStoreId()) {
                        Mage::app()->getLocale()->revert();
                    }
                    return $pdf;
                }

                /**
                 * Draw table header for product items
                 *
                 * @param  Zend_Pdf_Page $page page to draw on
                 *
                 * @return void
                 */
                protected function _drawHeader(Zend_Pdf_Page $page)
                {
                    $page->setFillColor($this->colors['grey1']);
                    $page->setLineColor($this->colors['grey1']);
                    $page->setLineWidth(1);
                    $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15);

                    $page->setFillColor($this->colors['black']);
                    $font = $this->_setFontRegular($page, 9);

                    $this->y -= 11;
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Pos'),
                        $this->margin['left'] + 3,
                        $this->y,
                        $this->encoding
                    );
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('No.'),
                        $this->margin['left'] + 25,
                        $this->y,
                        $this->encoding
                    );
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Description'),
                        $this->margin['left'] + 120,
                        $this->y,
                        $this->encoding
                    );

                    $singlePrice = Mage::helper('firegento_pdf')->__('Price (excl. tax)');
                    $page->drawText(
                        $singlePrice,
                        $this->margin['right'] - 153 - $this->widthForStringUsingFontSize($singlePrice, $font, 9),
                        $this->y,
                        $this->encoding
                    );

                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Qty'),
                        $this->margin['left'] + 360,
                        $this->y,
                        $this->encoding
                    );

                    $taxLabel = Mage::helper('firegento_pdf')->__('Tax');
                    $page->drawText(
                        $taxLabel,
                        $this->margin['right'] - 65 - $this->widthForStringUsingFontSize($taxLabel, $font, 9),
                        $this->y,
                        $this->encoding
                    );

                    $totalLabel = Mage::helper('firegento_pdf')->__('Total');
                    $page->drawText(
                        $totalLabel,
                        $this->margin['right'] - 10 - $this->widthForStringUsingFontSize($totalLabel, $font, 10),
                        $this->y,
                        $this->encoding
                    );
                }

                /**
                 * Initialize renderer process.
                 *
                 * @param  string $type renderer type to initialize
                 *
                 * @return void
                 */
                protected function _initRenderer($type)
                {
                    parent::_initRenderer($type);

                    $this->_renderers['default'] = array(
                        'model'    => 'firegento_pdf/items_default',
                        'renderer' => null
                    );
                    $this->_renderers['grouped'] = array(
                        'model'    => 'firegento_pdf/items_grouped',
                        'renderer' => null
                    );
                    $this->_renderers['bundle'] = array(
                        'model'    => 'firegento_pdf/items_bundle',
                        'renderer' => null
                    );
                    $this->_renderers['downloadable'] = array(
                        'model'    => 'firegento_pdf/items_downloadable',
                        'renderer' => null
                    );
                }

            }

            + Size: 7,345 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php

            123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
            <?php
            /**
             * This file is part of a FireGento e.V. module.
             *
             * This FireGento e.V. module is free software; you can redistribute it and/or
             * modify it under the terms of the GNU General Public License version 3 as
             * published by the Free Software Foundation.
             *
             * This script is distributed in the hope that it will be useful, but WITHOUT
             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
             *
             * PHP version 5
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             * @copyright 2014 FireGento Team (http://www.firegento.com)
             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
             */
            /**
             * Creditmemo model rewrite.
             *
             * @category  FireGento
             * @package   FireGento_Pdf
             * @author    FireGento Team <team@firegento.com>
             */
            class FireGento_Pdf_Model_Engine_Creditmemo_Default extends FireGento_Pdf_Model_Engine_Abstract
            {

                /**
                 * constructor to set mode to creditmemo
                 */
                public function __construct()
                {
                    parent::__construct();
                    $this->setMode('creditmemo');
                }

                /**
                 * Return PDF document
                 *
                 * @param  array $creditmemos creditmemos to generate pdfs for
                 *
                 * @return Zend_Pdf
                 */
                public function getPdf($creditmemos = array())
                {
                    $currentStore = Mage::app()->getStore()->getCode();
                    $this->_beforeGetPdf();
                    $this->_initRenderer('creditmemo');

                    $pdf = new Zend_Pdf();
                    $this->_setPdf($pdf);

                    foreach ($creditmemos as $creditmemo) {
                        // pagecounter is 0 at the beginning, because it is incremented in newPage()
                        $this->pagecounter = 0;
                        if ($creditmemo->getStoreId()) {
                            Mage::app()->getLocale()->emulate($creditmemo->getStoreId());
                            Mage::app()->setCurrentStore($creditmemo->getStoreId());
                        }

                        $order = $creditmemo->getOrder();
                        $this->setOrder($order);

                        $page = $this->newPage(array());

                        $this->insertAddressesAndHeader($page, $creditmemo, $order);

                        $this->_setFontRegular($page, 9);
                        $this->_drawHeader($page);

                        $this->y -= 20;

                        $position = 0;

                        foreach ($creditmemo->getAllItems() as $item) {
                            if ($item->getOrderItem()->getParentItem()) {
                                continue;
                            }

                            /* Draw item */
                            $position++;
                            $this->_drawItem($item, $page, $order, $position);
                            $page = end($pdf->pages);
                        }

                        /* add line after items */
                        $page->drawLine($this->margin['left'], $this->y + 5, $this->margin['right'], $this->y + 5);

                        /* Add totals */
                        $page = $this->insertTotals($page, $creditmemo);

                        /* add note */
                        $page = $this->_insertNote($page, $order, $creditmemo);

                        // Add footer
                        $this->_addFooter($page, $creditmemo->getStore());

                        if ($creditmemo->getStoreId()) {
                            Mage::app()->getLocale()->revert();
                        }
                    }

                    // Revert back to the original current store
                    Mage::app()->setCurrentStore($currentStore);

                    $this->_afterGetPdf();

                    return $pdf;
                }

                /**
                 * Draw table header for product items
                 *
                 * @param  Zend_Pdf_Page $page page to draw on
                 *
                 * @return void
                 */
                protected function _drawHeader(Zend_Pdf_Page $page)
                {
                    $page->setFillColor($this->colors['header']);
                    $page->setLineColor($this->colors['header']);
                    $page->setLineWidth(1);
                    $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15);

                    $page->setFillColor($this->colors['black']);
                    $font = $this->_setFontRegular($page, 9);

                    $this->y -= 11;
                    $page->drawText(Mage::helper('firegento_pdf')->__('Pos'), $this->margin['left'] + 3, $this->y, $this->encoding);
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('No.'), $this->margin['left'] + 25, $this->y, $this->encoding
                    );
                    $page->drawText(
                        Mage::helper('firegento_pdf')->__('Description'), $this->margin['left'] + 130, $this->y, $this->encoding
                    );

                    $columns = array();
                    $columns['price'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Price'),
                        '_width' => 60
                    );
                    $columns['price_incl_tax'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Price (incl. tax)'),
                        '_width' => 60
                    );
                    $columns['qty'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Qty'),
                        '_width' => 40
                    );
                    $columns['tax'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Tax'),
                        '_width' => 50
                    );
                    $columns['tax_rate'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Tax rate'),
                        '_width' => 50
                    );
                    $columns['subtotal'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Total'),
                        '_width' => 50
                    );
                    $columns['subtotal_incl_tax'] = array(
                        'label'  => Mage::helper('firegento_pdf')->__('Total (incl. tax)'),
                        '_width' => 70
                    );
                    // draw price, tax, and subtotal in specified order
                    $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                    // draw starting from right
                    $columnsOrder = array_reverse($columnsOrder);
                    $columnOffset = 0;
                    foreach ($columnsOrder as $columnName) {
                        $columnName = trim($columnName);
                        if (array_key_exists($columnName, $columns)) {
                            $column = $columns[$columnName];
                            $labelWidth = $this->widthForStringUsingFontSize($column['label'], $font, 9);
                            $page->drawText(
                                $column['label'],
                                $this->margin['right'] - $columnOffset - $labelWidth,
                                $this->y,
                                $this->encoding
                            );
                            $columnOffset += $column['_width'];
                        }
                    }
                }

                /**
                 * Initialize renderer process.
                 *
                 * @param  string $type renderer type to initialize
                 *
                 * @return void
                 */
                protected function _initRenderer($type)
                {
                    parent::_initRenderer($type);

                    $this->_renderers['default'] = array(
                        'model'    => 'firegento_pdf/items_default',
                        'renderer' => null
                    );
                    $this->_renderers['grouped'] = array(
                        'model'    => 'firegento_pdf/items_grouped',
                        'renderer' => null
                    );
                    $this->_renderers['bundle'] = array(
                        'model'    => 'firegento_pdf/items_bundle',
                        'renderer' => null
                    );
                    $this->_renderers['downloadable'] = array(
                        'model'    => 'firegento_pdf/items_downloadable',
                        'renderer' => null
                    );
                    $this->_renderers['ugiftcert'] = array(
                        'model'    => 'firegento_pdf/items_unirgy_default',
                        'renderer' => null
                    );
                }

            }

            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/index.xhtml index 6c9eafc..1aca67c 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

            Source of FireGento_Pdf

            - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

            • @@ -101,9 +101,9 @@ Default.php - 6.3 KB + 7.2 KB - 2014-10-26T15:22:24+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xhtml index 70c1ed2..00e784e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Default.php

              Source of file Default.php

              - Size: 7,266 Bytes - Last Modified: 2014-11-08T19:25:48+01:00

              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php

              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
              <?php
              /**
               * This file is part of the FIREGENTO project.
               *
               * FireGento_Pdf is free software; you can redistribute it and/or
               * modify it under the terms of the GNU General Public License version 3 as
               * published by the Free Software Foundation.
               *
               * This script is distributed in the hope that it will be useful, but WITHOUT
               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
               *
               * PHP version 5
               *
               * @category  FireGento
               * @package   FireGento_Pdf
               * @author    FireGento Team <team@firegento.com>
               * @copyright 2013 FireGento Team (http://www.firegento.com)
               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
               * @version   $Id:$
               * @since     0.1.0
               */
              /**
               * Default invoice rendering engine.
               *
               * @category  FireGento
               * @package   FireGento_Pdf
               * @author    FireGento Team <team@firegento.com>
               * @copyright 2013 FireGento Team (http://www.firegento.com)
               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
               * @version   $Id:$
               * @since     0.1.0
               */
              class FireGento_Pdf_Model_Engine_Invoice_Default extends FireGento_Pdf_Model_Engine_Abstract
              {

                  /**
                   * constructor to set mode to invoice
                   */
                  public function __construct()
                  {
                      parent::__construct();
                      $this->setMode('invoice');
                  }

                  /**
                   * Return PDF document
                   *
                   * @param  array $invoices invoices to render pdfs for
                   *
                   * @return Zend_Pdf
                   */
                  public function getPdf($invoices = array())
                  {
                      $this->_beforeGetPdf();
                      $this->_initRenderer('invoice');

                      $pdf = new Zend_Pdf();
                      $this->_setPdf($pdf);

                      foreach ($invoices as $invoice) {
                          // pagecounter is 0 at the beginning, because it is incremented in newPage()
                          $this->pagecounter = 0;
                          if ($invoice->getStoreId()) {
                              Mage::app()->getLocale()->emulate($invoice->getStoreId());
                              Mage::app()->setCurrentStore($invoice->getStoreId());
                          }
                          $order = $invoice->getOrder();
                          $this->setOrder($order);

                          $page = $this->newPage();

                          $this->insertAddressesAndHeader($page, $invoice, $order);

                          $this->_setFontRegular($page, 9);
                          $this->insertTableHeader($page);

                          $this->y -= 20;

                          $position = 0;

                          foreach ($invoice->getAllItems() as $item) {
                              if ($item->getOrderItem()->getParentItem()) {
                                  continue;
                              }

                              $showFooter = Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer');
                              if ($this->y < 50 || ($showFooter == 1 && $this->y < 100)) {
                                  $page = $this->newPage(array());
                              }

                              $position++;
                              $page = $this->_drawItem($item, $page, $order, $position);
                          }

                          /* add line after items */
                          $page->drawLine($this->margin['left'], $this->y + 5, $this->margin['right'], $this->y + 5);

                          /* add totals */
                          $page = $this->insertTotals($page, $invoice);

                          /* add note */
                          $page = $this->_insertNote($page, $order, $invoice);

                          // Add footer
                          $this->_addFooter($page, $invoice->getStore());
                      }

                      $this->_afterGetPdf();

                      return $pdf;
                  }

                  /**
                   * Insert Table Header for Items
                   *
                   * @param  Zend_Pdf_Page &$page current page object of Zend_PDF
                   *
                   * @return void
                   */
                  protected function insertTableHeader(&$page)
                  {
                      $page->setFillColor($this->colors['grey1']);
                      $page->setLineColor($this->colors['grey1']);
                      $page->setLineWidth(1);
                      $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15);

                      $page->setFillColor($this->colors['black']);
                      $font = $this->_setFontRegular($page, 9);

                      $this->y -= 11;
                      $page->drawText(Mage::helper('firegento_pdf')->__('Pos'), $this->margin['left'] + 3, $this->y, $this->encoding);
                      $page->drawText(
                          Mage::helper('firegento_pdf')->__('No.'), $this->margin['left'] + 25, $this->y, $this->encoding
                      );
                      $page->drawText(
                          Mage::helper('firegento_pdf')->__('Description'), $this->margin['left'] + 130, $this->y, $this->encoding
                      );

                      $columns = array();
                      $columns['price'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Price'),
                          '_width' => 60
                      );
                      $columns['price_incl_tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Price (incl. tax)'),
                          '_width' => 60
                      );
                      $columns['qty'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Qty'),
                          '_width' => 40
                      );
                      $columns['tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Tax'),
                          '_width' => 50
                      );
                      $columns['tax_rate'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Tax rate'),
                          '_width' => 50
                      );
                      $columns['subtotal'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Total'),
                          '_width' => 50
                      );
                      $columns['subtotal_incl_tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Total (incl. tax)'),
                          '_width' => 70
                      );
                      // draw price, tax, and subtotal in specified order
                      $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                      // draw starting from right
                      $columnsOrder = array_reverse($columnsOrder);
                      $columnOffset = 0;
                      foreach ($columnsOrder as $columnName) {
                          $columnName = trim($columnName);
                          if (array_key_exists($columnName, $columns)) {
                              $column = $columns[$columnName];
                              $labelWidth = $this->widthForStringUsingFontSize($column['label'], $font, 9);
                              $page->drawText(
                                  $column['label'],
                                  $this->margin['right'] - $columnOffset - $labelWidth,
                                  $this->y,
                                  $this->encoding
                              );
                              $columnOffset += $column['_width'];
                          }
                      }
                  }

                  /**
                   * Initialize renderer process
                   *
                   * @param  string $type renderer type to be initialized
                   *
                   * @return void
                   */
                  protected function _initRenderer($type)
                  {
                      parent::_initRenderer($type);

                      $this->_renderers['default'] = array(
                          'model'    => 'firegento_pdf/items_default',
                          'renderer' => null
                      );
                      $this->_renderers['grouped'] = array(
                          'model'    => 'firegento_pdf/items_grouped',
                          'renderer' => null
                      );
                      $this->_renderers['bundle'] = array(
                          'model'    => 'firegento_pdf/items_bundle',
                          'renderer' => null
                      );
                      $this->_renderers['downloadable'] = array(
                          'model'    => 'firegento_pdf/items_downloadable',
                          'renderer' => null
                      );
                  }

              }

              + Size: 7,472 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php

              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
              <?php
              /**
               * This file is part of a FireGento e.V. module.
               *
               * This FireGento e.V. module is free software; you can redistribute it and/or
               * modify it under the terms of the GNU General Public License version 3 as
               * published by the Free Software Foundation.
               *
               * This script is distributed in the hope that it will be useful, but WITHOUT
               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
               *
               * PHP version 5
               *
               * @category  FireGento
               * @package   FireGento_Pdf
               * @author    FireGento Team <team@firegento.com>
               * @copyright 2014 FireGento Team (http://www.firegento.com)
               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
               */
              /**
               * Default invoice rendering engine.
               *
               * @category  FireGento
               * @package   FireGento_Pdf
               * @author    FireGento Team <team@firegento.com>
               */
              class FireGento_Pdf_Model_Engine_Invoice_Default extends FireGento_Pdf_Model_Engine_Abstract
              {

                  /**
                   * constructor to set mode to invoice
                   */
                  public function __construct()
                  {
                      parent::__construct();
                      $this->setMode('invoice');
                  }

                  /**
                   * Return PDF document
                   *
                   * @param  array $invoices invoices to render pdfs for
                   *
                   * @return Zend_Pdf
                   */
                  public function getPdf($invoices = array())
                  {
                      $currentStore = Mage::app()->getStore()->getCode();
                      $this->_beforeGetPdf();
                      $this->_initRenderer('invoice');

                      $pdf = new Zend_Pdf();
                      $this->_setPdf($pdf);

                      foreach ($invoices as $invoice) {
                          // pagecounter is 0 at the beginning, because it is incremented in newPage()
                          $this->pagecounter = 0;
                          if ($invoice->getStoreId()) {
                              Mage::app()->getLocale()->emulate($invoice->getStoreId());
                              Mage::app()->setCurrentStore($invoice->getStoreId());
                          }

                          $order = $invoice->getOrder();
                          $this->setOrder($order);

                          $page = $this->newPage();

                          $this->insertAddressesAndHeader($page, $invoice, $order);

                          $this->_setFontRegular($page, 9);
                          $this->insertTableHeader($page);

                          $this->y -= 20;

                          $position = 0;

                          foreach ($invoice->getAllItems() as $item) {
                              if ($item->getOrderItem()->getParentItem()) {
                                  continue;
                              }

                              $showFooter = Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer');
                              if ($this->y < 50 || ($showFooter == 1 && $this->y < 100)) {
                                  $page = $this->newPage(array());
                              }

                              $position++;
                              $page = $this->_drawItem($item, $page, $order, $position);
                          }

                          /* add line after items */
                          $page->drawLine($this->margin['left'], $this->y + 5, $this->margin['right'], $this->y + 5);

                          /* add totals */
                          $page = $this->insertTotals($page, $invoice);

                          /* add note */
                          $page = $this->_insertNote($page, $order, $invoice);

                          // Add footer
                          $this->_addFooter($page, $invoice->getStore());

                          if ($invoice->getStoreId()) {
                              Mage::app()->getLocale()->revert();
                          }
                      }

                      // Revert back to the original current store
                      Mage::app()->setCurrentStore($currentStore);

                      $this->_afterGetPdf();

                      return $pdf;
                  }

                  /**
                   * Insert Table Header for Items
                   *
                   * @param  Zend_Pdf_Page $page current page object of Zend_PDF
                   *
                   * @return void
                   */
                  protected function insertTableHeader($page)
                  {
                      $page->setFillColor($this->colors['header']);
                      $page->setLineColor($this->colors['header']);
                      $page->setLineWidth(1);
                      $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15);

                      $page->setFillColor($this->colors['black']);
                      $font = $this->_setFontRegular($page, 9);

                      $this->y -= 11;
                      $page->drawText(Mage::helper('firegento_pdf')->__('Pos'), $this->margin['left'] + 3, $this->y, $this->encoding);
                      $page->drawText(
                          Mage::helper('firegento_pdf')->__('No.'), $this->margin['left'] + 25, $this->y, $this->encoding
                      );
                      $page->drawText(
                          Mage::helper('firegento_pdf')->__('Description'), $this->margin['left'] + 130, $this->y, $this->encoding
                      );

                      $columns = array();
                      $columns['price'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Price'),
                          '_width' => 60
                      );
                      $columns['price_incl_tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Price (incl. tax)'),
                          '_width' => 60
                      );
                      $columns['qty'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Qty'),
                          '_width' => 40
                      );
                      $columns['tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Tax'),
                          '_width' => 50
                      );
                      $columns['tax_rate'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Tax rate'),
                          '_width' => 50
                      );
                      $columns['subtotal'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Total'),
                          '_width' => 50
                      );
                      $columns['subtotal_incl_tax'] = array(
                          'label'  => Mage::helper('firegento_pdf')->__('Total (incl. tax)'),
                          '_width' => 70
                      );
                      // draw price, tax, and subtotal in specified order
                      $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                      // draw starting from right
                      $columnsOrder = array_reverse($columnsOrder);
                      $columnOffset = 0;
                      foreach ($columnsOrder as $columnName) {
                          $columnName = trim($columnName);
                          if (array_key_exists($columnName, $columns)) {
                              $column = $columns[$columnName];
                              $labelWidth = $this->widthForStringUsingFontSize($column['label'], $font, 9);
                              $page->drawText(
                                  $column['label'],
                                  $this->margin['right'] - $columnOffset - $labelWidth,
                                  $this->y,
                                  $this->encoding
                              );
                              $columnOffset += $column['_width'];
                          }
                      }
                  }

                  /**
                   * Initialize renderer process
                   *
                   * @param  string $type renderer type to be initialized
                   *
                   * @return void
                   */
                  protected function _initRenderer($type)
                  {
                      parent::_initRenderer($type);

                      $this->_renderers['default'] = array(
                          'model'    => 'firegento_pdf/items_default',
                          'renderer' => null
                      );
                      $this->_renderers['grouped'] = array(
                          'model'    => 'firegento_pdf/items_grouped',
                          'renderer' => null
                      );
                      $this->_renderers['bundle'] = array(
                          'model'    => 'firegento_pdf/items_bundle',
                          'renderer' => null
                      );
                      $this->_renderers['downloadable'] = array(
                          'model'    => 'firegento_pdf/items_downloadable',
                          'renderer' => null
                      );
                      $this->_renderers['ugiftcert'] = array(
                          'model'    => 'firegento_pdf/items_unirgy_default',
                          'renderer' => null
                      );
                  }

              }

              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/index.xhtml index 61f5ac8..9eb70c3 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Invoice/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

              Source of FireGento_Pdf

              - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

              • @@ -101,9 +101,9 @@ Default.php - 7.1 KB + 7.3 KB - 2014-11-08T19:25:48+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xhtml index dbf309c..7233ae2 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Default.php

                Source of file Default.php

                - Size: 6,225 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php

                123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
                <?php
                /**
                 * This file is part of the FIREGENTO project.
                 *
                 * FireGento_Pdf is free software; you can redistribute it and/or
                 * modify it under the terms of the GNU General Public License version 3 as
                 * published by the Free Software Foundation.
                 *
                 * This script is distributed in the hope that it will be useful, but WITHOUT
                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                 *
                 * PHP version 5
                 *
                 * @category  FireGento
                 * @package   FireGento_Pdf
                 * @author    FireGento Team <team@firegento.com>
                 * @copyright 2013 FireGento Team (http://www.firegento.com)
                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                 * @version   $Id:$
                 * @since     0.1.0
                 */

                /**
                 * Shipment model rewrite.
                 *
                 * @category  FireGento
                 * @package   FireGento_Pdf
                 * @author    FireGento Team <team@firegento.com>
                 * @copyright 2013 FireGento Team (http://www.firegento.com)
                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                 * @version   $Id:$
                 * @since     0.1.0
                 */
                class FireGento_Pdf_Model_Engine_Shipment_Default
                    extends FireGento_Pdf_Model_Engine_Abstract
                {

                    /**
                     * constructor to set shipping mode
                     */
                    public function __construct()
                    {
                        parent::__construct();
                        $this->setMode('shipment');
                    }

                    /**
                     * Return PDF document
                     *
                     * @param  array $shipments list of shipments to generate pdfs for
                     *
                     * @return Zend_Pdf
                     */
                    public function getPdf($shipments = array())
                    {
                        $this->_beforeGetPdf();
                        $this->_initRenderer('shipment');

                        $pdf = new Zend_Pdf();
                        $this->_setPdf($pdf);

                        foreach ($shipments as $shipment) {
                            // pagecounter is 0 at the beginning, because it is incremented in newPage()
                            $this->pagecounter = 0;
                            if ($shipment->getStoreId()) {
                                Mage::app()->getLocale()->emulate($shipment->getStoreId());
                                Mage::app()->setCurrentStore($shipment->getStoreId());
                            }
                            $order = $shipment->getOrder();
                            $this->setOrder($order);

                            $page = $this->newPage(array());

                            $this->insertAddressesAndHeader($page, $shipment, $order);

                            $this->_setFontRegular($page, 9);
                            $this->insertTableHeader($page);

                            $this->y -= 20;

                            $position = 0;

                            foreach ($shipment->getAllItems() as $item) {
                                if ($item->getOrderItem()->getParentItem()) {
                                    continue;
                                }

                                if ($this->y < 50
                                    || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer')
                                        == 1
                                        && $this->y < 100)
                                ) {
                                    $page = $this->newPage(array());
                                }

                                $position++;
                                $page = $this->_drawItem($item, $page, $order, $position);
                            }

                            /* add note */
                            $page = $this->_insertNote($page, $order, $shipment);

                            // Add footer
                            $this->_addFooter($page, $shipment->getStore());
                        }

                        $this->_afterGetPdf();

                        return $pdf;
                    }

                    /**
                     * Inserts the customer's shipping address.
                     *
                     * @param  Zend_Pdf_Page          &$page current page object of Zend_Pdf
                     * @param  Mage_Sales_Model_Order $order order object
                     *
                     * @return void
                     */
                    protected function _insertCustomerAddress(&$page, $order)
                    {
                        $this->_setFontRegular($page, 9);
                        $shipping = $this->_formatAddress($order->getShippingAddress()
                                ->format('pdf'));
                        foreach ($shipping as $line) {
                            $page->drawText(trim(strip_tags($line)), $this->margin['left'],
                                $this->y, $this->encoding);
                            $this->Ln(12);
                        }
                    }

                    /**
                     * insert the table header of the shipment
                     *
                     * @param Zend_Pdf_Page $page page to write on
                     */
                    protected function insertTableHeader($page)
                    {
                        $page->setFillColor($this->colors['grey1']);
                        $page->setLineColor($this->colors['grey1']);
                        $page->setLineWidth(1);
                        $page->drawRectangle($this->margin['left'], $this->y,
                            $this->margin['right'] - 10, $this->y - 15);

                        $page->setFillColor($this->colors['black']);
                        $this->_setFontRegular($page, 9);

                        $this->y -= 11;
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('No.'),
                            $this->margin['left'],
                            $this->y,
                            $this->encoding
                        );
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Description'),
                            $this->margin['left'] + 105,
                            $this->y,
                            $this->encoding
                        );

                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Qty'),
                            $this->margin['left'] + 450,
                            $this->y,
                            $this->encoding
                        );
                    }

                    /**
                     * insert address into pdf
                     *
                     * @param Zend_Pdf_Page          $page  to insert addres into
                     * @param Mage_Sales_Model_Order $order order to get address from
                     */
                    protected function insertShippingAddress($page, $order)
                    {
                        $this->_setFontRegular($page, 9);

                        $billing = $this->_formatAddress($order->getShippingAddress()
                                ->format('pdf'));

                        foreach ($billing as $line) {
                            $page->drawText(trim(strip_tags($line)), $this->margin['left'],
                                $this->y, $this->encoding);
                            $this->Ln(12);
                        }
                    }

                    /**
                     * Initialize renderer process.
                     *
                     * @param  string $type type to be initialized
                     *
                     * @return void
                     */
                    protected function _initRenderer($type)
                    {
                        parent::_initRenderer($type);

                        $this->_renderers['default'] = array(
                            'model'    => 'firegento_pdf/items_shipment_default',
                            'renderer' => null
                        );
                        $this->_renderers['bundle'] = array(
                            'model'    => 'firegento_pdf/items_shipment_bundle',
                            'renderer' => null
                        );
                    }

                }

                + Size: 8,254 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php

                123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
                <?php
                /**
                 * This file is part of a FireGento e.V. module.
                 *
                 * This FireGento e.V. module is free software; you can redistribute it and/or
                 * modify it under the terms of the GNU General Public License version 3 as
                 * published by the Free Software Foundation.
                 *
                 * This script is distributed in the hope that it will be useful, but WITHOUT
                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                 *
                 * PHP version 5
                 *
                 * @category  FireGento
                 * @package   FireGento_Pdf
                 * @author    FireGento Team <team@firegento.com>
                 * @copyright 2014 FireGento Team (http://www.firegento.com)
                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                 */
                /**
                 * Shipment model rewrite.
                 *
                 * @category  FireGento
                 * @package   FireGento_Pdf
                 * @author    FireGento Team <team@firegento.com>
                 */
                class FireGento_Pdf_Model_Engine_Shipment_Default
                    extends FireGento_Pdf_Model_Engine_Abstract
                {

                    /**
                     * constructor to set shipping mode
                     */
                    public function __construct()
                    {
                        parent::__construct();
                        $this->setMode('shipment');
                    }

                    /**
                     * Return PDF document
                     *
                     * @param  array $shipments list of shipments to generate pdfs for
                     *
                     * @return Zend_Pdf
                     */
                    public function getPdf($shipments = array())
                    {
                        $currentStore = Mage::app()->getStore()->getCode();
                        $this->_beforeGetPdf();
                        $this->_initRenderer('shipment');

                        $pdf = new Zend_Pdf();
                        $this->_setPdf($pdf);

                        foreach ($shipments as $shipment) {
                            // pagecounter is 0 at the beginning, because it is incremented in newPage()
                            $this->pagecounter = 0;
                            if ($shipment->getStoreId()) {
                                Mage::app()->getLocale()->emulate($shipment->getStoreId());
                                Mage::app()->setCurrentStore($shipment->getStoreId());
                            }

                            $order = $shipment->getOrder();
                            $this->setOrder($order);

                            $page = $this->newPage(array());

                            $this->insertAddressesAndHeader($page, $shipment, $order);

                            $this->_setFontRegular($page, 9);
                            $this->insertTableHeader($page);

                            $this->y -= 20;

                            $position = 0;

                            foreach ($shipment->getAllItems() as $item) {
                                if ($item->getOrderItem()->getParentItem()) {
                                    continue;
                                }

                                if ($this->y < 50
                                    || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer')
                                        == 1
                                        && $this->y < 100)
                                ) {
                                    $page = $this->newPage(array());
                                }

                                $position++;
                                $page = $this->_drawItem($item, $page, $order, $position);
                            }

                            /* add shipment tracks */
                            $page = $this->_printShipmentTracks($page, $order, $shipment);

                            /* add note */
                            $page = $this->_insertNote($page, $order, $shipment);

                            // Add footer
                            $this->_addFooter($page, $shipment->getStore());

                            if ($shipment->getStoreId()) {
                                Mage::app()->getLocale()->revert();
                            }
                        }

                        // Revert back to the original current store
                        Mage::app()->setCurrentStore($currentStore);

                        $this->_afterGetPdf();

                        return $pdf;
                    }

                    /**
                     * Inserts the customer's shipping address.
                     *
                     * @param  Zend_Pdf_Page          $page current page object of Zend_Pdf
                     * @param  Mage_Sales_Model_Order $order order object
                     *
                     * @return void
                     */
                    protected function _insertCustomerAddress($page, $order)
                    {
                        $this->_setFontRegular($page, 9);
                        $shipping = $this->_formatAddress($order->getShippingAddress()->format('pdf'));
                        foreach ($shipping as $line) {
                            $page->drawText(trim(strip_tags($line)), $this->margin['left'], $this->y, $this->encoding);
                            $this->Ln(12);
                        }
                    }

                    /**
                     * insert the table header of the shipment
                     *
                     * @param Zend_Pdf_Page $page page to write on
                     */
                    protected function insertTableHeader($page)
                    {
                        $page->setFillColor($this->colors['header']);
                        $page->setLineColor($this->colors['header']);
                        $page->setLineWidth(1);
                        $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'] - 10, $this->y - 15);

                        $page->setFillColor($this->colors['black']);
                        $this->_setFontRegular($page, 9);

                        $this->y -= 11;
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('No.'),
                            $this->margin['left'],
                            $this->y,
                            $this->encoding
                        );
                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Description'),
                            $this->margin['left'] + 105,
                            $this->y,
                            $this->encoding
                        );

                        $page->drawText(
                            Mage::helper('firegento_pdf')->__('Qty'),
                            $this->margin['left'] + 450,
                            $this->y,
                            $this->encoding
                        );
                    }

                    /**
                     * insert address into pdf
                     *
                     * @param Zend_Pdf_Page          $page  to insert addres into
                     * @param Mage_Sales_Model_Order $order order to get address from
                     */
                    protected function insertShippingAddress($page, $order)
                    {
                        $this->_setFontRegular($page, 9);

                        $billing = $this->_formatAddress($order->getShippingAddress()->format('pdf'));

                        foreach ($billing as $line) {
                            $page->drawText(trim(strip_tags($line)), $this->margin['left'], $this->y, $this->encoding);
                            $this->Ln(12);
                        }
                    }

                    /**
                     * This will print all the shipment tracks.
                     *
                     * @param Zend_Pdf_Page $page
                     * @param Mage_Sales_Model_Order $order
                     * @param Mage_Sales_Model_Order_Shipment $shipment
                     *
                     * @return Zend_Pdf_Page
                     */
                    protected function _printShipmentTracks($page, $order, $shipment)
                    {
                        if (!Mage::getStoreConfigFlag('sales_pdf/shipment/show_tracking_numbers') || $order->getIsVirtual()) {
                            return $page;
                        }

                        $tracks = array();
                        if ($shipment) {
                            $tracks = $shipment->getAllTracks();
                        }

                        if (empty($tracks)) {
                            return $page;
                        }

                        $this->y -= 20;
                        $page->setFillColor($this->colors['header']);
                        $page->setLineColor($this->colors['header']);
                        $page->setLineWidth(1);
                        $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'] - 10, $this->y - 15);
                        $page->setFillColor($this->colors['black']);
                        $this->_setFontRegular($page, 9);
                        $this->y -= 11;
                        $page->drawText(Mage::helper('sales')->__('Carrier'), $this->margin['left'], $this->y, 'UTF-8');
                        $page->drawText(Mage::helper('sales')->__('Number'), 290, $this->y, 'UTF-8');
                        $page->setFillColor($this->colors['text']);
                        $this->y -= 18;
                        foreach ($tracks as $track) {
                            $maxTitleLen    = 45;
                            $endOfTitle     = strlen($track->getTitle()) > $maxTitleLen ? '...' : '';
                            $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle;
                            $page->drawText($truncatedTitle, $this->margin['left'], $this->y, 'UTF-8');
                            $page->drawText($track->getNumber(), 290, $this->y, 'UTF-8');
                            $this->y -= 18;
                        }

                        return $page;
                    }

                    /**
                     * Initialize renderer process.
                     *
                     * @param  string $type type to be initialized
                     *
                     * @return void
                     */
                    protected function _initRenderer($type)
                    {
                        parent::_initRenderer($type);

                        $this->_renderers['default'] = array(
                            'model'    => 'firegento_pdf/items_shipment_default',
                            'renderer' => null
                        );
                        $this->_renderers['bundle'] = array(
                            'model'    => 'firegento_pdf/items_shipment_bundle',
                            'renderer' => null
                        );
                        $this->_renderers['ugiftcert'] = array(
                            'model'    => 'firegento_pdf/items_unirgy_shipment_default',
                            'renderer' => null
                        );
                    }

                }

                Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/index.xhtml index b595f45..ab96bff 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/Shipment/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

                Source of FireGento_Pdf

                - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                • @@ -101,9 +101,9 @@ Default.php - 6.1 KB + 8.1 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/index.xhtml index 6aa8549..1b29e5b 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Engine/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                  Source of FireGento_Pdf

                  - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                  • @@ -95,9 +95,9 @@ Abstract.php - 46.3 KB + 50.2 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Invoice.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Invoice.php.xhtml index 46cb6aa..8c9c1f1 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Invoice.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Invoice.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Invoice.php

                    Source of file Invoice.php

                    - Size: 2,341 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Invoice.php

                    12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    /**
                     * Invoice model rewrite.
                     *
                     * The invoice model serves as a proxy to the actual PDF engine as set via
                     * backend configuration.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    class FireGento_Pdf_Model_Invoice
                    {

                        /**
                         * The actual PDF engine responsible for rendering the file.
                         *
                         * @var Mage_Sales_Model_Order_Pdf_Abstract
                         */
                        private $_engine;

                        /**
                         * get pdf rendering engine
                         *
                         * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Invoice
                         */
                        protected function getEngine()
                        {
                            if (!$this->_engine) {
                                $modelClass = Mage::getStoreConfig('sales_pdf/invoice/engine');
                                $engine = Mage::getModel($modelClass);

                                if (!$engine) {
                                    // Fallback to Magento standard invoice layout.
                                    $engine = new Mage_Sales_Model_Order_Pdf_Invoice();
                                }

                                $this->_engine = $engine;
                            }

                            return $this->_engine;
                        }

                        /**
                         * get pdf for invoices
                         *
                         * @param  array|Varien_Data_Collection $invoices invoices to render pdfs for
                         *
                         * @return mixed
                         */
                        public function getPdf($invoices = array())
                        {
                            return $this->getEngine()->getPdf($invoices);
                        }

                    }

                    + Size: 2,273 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Invoice.php

                    1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Invoice model rewrite.
                     *
                     * The invoice model serves as a proxy to the actual PDF engine as set via
                     * backend configuration.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice
                    {

                        /**
                         * The actual PDF engine responsible for rendering the file.
                         *
                         * @var Mage_Sales_Model_Order_Pdf_Abstract
                         */
                        protected $_engine;

                        /**
                         * get pdf rendering engine
                         *
                         * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Invoice
                         */
                        protected function getEngine()
                        {
                            if (!$this->_engine) {
                                $modelClass = Mage::getStoreConfig('sales_pdf/invoice/engine');
                                $engine = Mage::getModel($modelClass);

                                if (!$engine || $engine instanceof FireGento_Pdf_Model_Invoice) {
                                    // Fallback to Magento standard invoice layout.
                                    // use new here to circumvent our own rewrite
                                    $engine = new Mage_Sales_Model_Order_Pdf_Invoice();
                                }

                                $this->_engine = $engine;
                            }

                            return $this->_engine;
                        }

                        /**
                         * get pdf for invoices
                         *
                         * @param  array|Varien_Data_Collection $invoices invoices to render pdfs for
                         *
                         * @return mixed
                         */
                        public function getPdf($invoices = array())
                        {
                            return $this->getEngine()->getPdf($invoices);
                        }

                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xhtml index 43912ce..752c24e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Bundle.php

                    Source of file Bundle.php

                    - Size: 9,119 Bytes - Last Modified: 2014-10-26T15:22:24+01:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    /**
                     * Bundle item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    class FireGento_Pdf_Model_Items_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();

                            $fontSize = 9;

                            $this->_setFontRegular();
                            $items = $this->getChilds($item);

                            $_prevOptionId = '';
                            $drawItems = array();

                            foreach ($items as $_item) {
                                $line = array();

                                $attributes = $this->getSelectionAttributes($_item);
                                if (is_array($attributes)) {
                                    $optionId = $attributes['option_id'];
                                } else {
                                    $optionId = 0;
                                }

                                if (!isset($drawItems[$optionId])) {
                                    $drawItems[$optionId] = array(
                                        'lines'  => array(),
                                        'height' => 15
                                    );
                                }

                                if ($_item->getOrderItem()->getParentItem()) {
                                    if ($_prevOptionId != $attributes['option_id']) {
                                        $line[0] = array(
                                            'font'  => 'italic',
                                            'text'  => Mage::helper('core/string')->str_split($attributes['option_label'], 45, true, true),
                                            'feed'  => $pdf->margin['left'] + 130,
                                            'font_size' => $fontSize
                                        );

                                        $drawItems[$optionId] = array(
                                            'lines'  => array($line),
                                            'height' => 15
                                        );

                                        $line = array();

                                        $_prevOptionId = $attributes['option_id'];
                                    }
                                }

                                // draw SKUs
                                if (!$_item->getOrderItem()->getParentItem()) {
                                    $text = array();
                                    foreach (Mage::helper('core/string')->str_split($item->getSku(), 17) as $part) {
                                        $text[] = $part;
                                    }

                                    // draw Position Number
                                    $line[] = array(
                                        'text'      => $position,
                                        'feed'      => $pdf->margin['left'] + 10,
                                        'align'     => 'right',
                                        'font_size' => $fontSize
                                    );

                                    $line[] = array(
                                        'text'      => $text,
                                        'feed'      => $pdf->margin['left'] + 25,
                                        'font_size' => $fontSize
                                    );
                                }

                                /* in case Product name is longer than 80 chars - it is written in a few lines */
                                if ($_item->getOrderItem()->getParentItem()) {
                                    $name = $this->getValueHtml($_item);
                                } else {
                                    $name = $_item->getName();
                                }
                                $line[] = array(
                                    'text'  => Mage::helper('core/string')->str_split($name, 35, true, true),
                                    'feed'  => $pdf->margin['left'] + 130,
                                    'font_size' => $fontSize
                                );

                                // draw prices
                                if ($this->canShowPriceInfo($_item)) {
                                    $columns = array();
                                    // prepare qty
                                    $columns['qty'] = array(
                                        'text'      => $item->getQty() * 1,
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width' => 30
                                    );

                                    // prepare price
                                    $columns['price'] = array(
                                        'text'      => $order->formatPriceTxt($item->getPrice()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 60
                                    );

                                    // prepare price_incl_tax
                                    $columns['price_incl_tax'] = array(
                                        'text'      => $order->formatPriceTxt($item->getPriceInclTax()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 60
                                    );

                                    // prepare tax
                                    $columns['tax'] = array(
                                        'text'      => $order->formatPriceTxt($item->getTaxAmount() + $item->getHiddenTaxAmount()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare tax_rate
                                    $columns['tax_rate'] = array(
                                        'text'      => round($item->getOrderItem()->getTaxPercent(), 2) . '%',
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare subtotal
                                    $columns['subtotal'] = array(
                                        'text'      => $order->formatPriceTxt($item->getRowTotal()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare subtotal_incl_tax
                                    $columns['subtotal_incl_tax'] = array(
                                        'text'      => $order->formatPriceTxt($item->getRowTotalInclTax()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 70
                                    );

                                    // draw columns in specified order
                                    $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                                    // draw starting from right
                                    $columnsOrder = array_reverse($columnsOrder);
                                    $columnOffset = 0;
                                    foreach ($columnsOrder as $columnName) {
                                        $columnName = trim($columnName);
                                        if (array_key_exists($columnName, $columns)) {
                                            $column = $columns[$columnName];
                                            $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                            $columnOffset += $column['_width'];
                                            unset($column['_width']);
                                            $line[] = $column;
                                        }
                                    }
                                }

                                $drawItems[$optionId]['lines'][] = $line;
                            }

                            // custom options
                            $options = $item->getOrderItem()->getProductOptions();
                            if ($options) {
                                if (isset($options['options'])) {
                                    foreach ($options['options'] as $option) {
                                        $lines = array();
                                        $lines[][] = array(
                                            'text' => Mage::helper('core/string')->str_split(strip_tags($option['label']), 40, true, true),
                                            'font' => 'italic',
                                            'feed' => 35
                                        );

                                        if ($option['value']) {
                                            $text = array();
                                            $_printValue = isset($option['print_value'])
                                                ? $option['print_value']
                                                : strip_tags($option['value']);
                                            $values = explode(', ', $_printValue);
                                            foreach ($values as $value) {
                                                foreach (Mage::helper('core/string')->str_split($value, 30, true, true) as $_value) {
                                                    $text[] = $_value;
                                                }
                                            }

                                            $lines[][] = array(
                                                'text' => $text,
                                                'feed' => 40
                                            );
                                        }

                                        $drawItems[] = array(
                                            'lines'  => $lines,
                                            'height' => 15
                                        );
                                    }
                                }
                            }

                            $page = $pdf->drawLineBlocks($page, $drawItems, array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    + Size: 8,876 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Bundle item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();

                            $fontSize = 9;

                            $items = $this->getChilds($item);

                            $_prevOptionId = '';
                            $drawItems = array();

                            foreach ($items as $_item) {
                                $line = array();

                                $attributes = $this->getSelectionAttributes($_item);
                                if (is_array($attributes)) {
                                    $optionId = $attributes['option_id'];
                                } else {
                                    $optionId = 0;
                                }

                                if (!isset($drawItems[$optionId])) {
                                    $drawItems[$optionId] = array(
                                        'lines'  => array(),
                                        'height' => 15
                                    );
                                }

                                if ($_item->getOrderItem()->getParentItem()) {
                                    if ($_prevOptionId != $attributes['option_id']) {
                                        $line[0] = array(
                                            'font'  => 'italic',
                                            'text'  => Mage::helper('core/string')->str_split($attributes['option_label'], 45, true, true),
                                            'feed'  => $pdf->margin['left'] + 130,
                                            'font_size' => $fontSize
                                        );

                                        $drawItems[$optionId] = array(
                                            'lines'  => array($line),
                                            'height' => 15
                                        );

                                        $line = array();

                                        $_prevOptionId = $attributes['option_id'];
                                    }
                                }

                                // draw SKUs
                                if (!$_item->getOrderItem()->getParentItem()) {
                                    $text = array();
                                    foreach (Mage::helper('core/string')->str_split($item->getSku(), 17) as $part) {
                                        $text[] = $part;
                                    }

                                    // draw Position Number
                                    $line[] = array(
                                        'text'      => $position,
                                        'feed'      => $pdf->margin['left'] + 10,
                                        'align'     => 'right',
                                        'font_size' => $fontSize
                                    );

                                    $line[] = array(
                                        'text'      => $text,
                                        'feed'      => $pdf->margin['left'] + 25,
                                        'font_size' => $fontSize
                                    );
                                }

                                /* in case Product name is longer than 80 chars - it is written in a few lines */
                                if ($_item->getOrderItem()->getParentItem()) {
                                    $name = $this->getValueHtml($_item);
                                } else {
                                    $name = $_item->getName();
                                }

                                $line[] = array(
                                    'text'  => Mage::helper('core/string')->str_split($name, 35, true, true),
                                    'feed'  => $pdf->margin['left'] + 130,
                                    'font_size' => $fontSize
                                );

                                // draw prices
                                if ($this->canShowPriceInfo($_item)) {
                                    $columns = array();
                                    // prepare qty
                                    $columns['qty'] = array(
                                        'text'      => $_item->getQty() * 1,
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width' => 30
                                    );

                                    // prepare price
                                    $columns['price'] = array(
                                        'text'      => $order->formatPriceTxt($_item->getPrice()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 60
                                    );

                                    // prepare price_incl_tax
                                    $columns['price_incl_tax'] = array(
                                        'text'      => $order->formatPriceTxt($_item->getPriceInclTax()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 60
                                    );

                                    // prepare tax
                                    $columns['tax'] = array(
                                        'text'      => $order->formatPriceTxt($_item->getTaxAmount() + $_item->getHiddenTaxAmount()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare tax_rate
                                    $columns['tax_rate'] = array(
                                        'text'      => round($_item->getOrderItem()->getTaxPercent(), 2) . '%',
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare subtotal
                                    $columns['subtotal'] = array(
                                        'text'      => $order->formatPriceTxt($_item->getRowTotal()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 50
                                    );

                                    // prepare subtotal_incl_tax
                                    $columns['subtotal_incl_tax'] = array(
                                        'text'      => $order->formatPriceTxt($_item->getRowTotalInclTax()),
                                        'align'     => 'right',
                                        'font_size' => $fontSize,
                                        '_width'    => 70
                                    );

                                    // draw columns in specified order
                                    $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                                    // draw starting from right
                                    $columnsOrder = array_reverse($columnsOrder);
                                    $columnOffset = 0;
                                    foreach ($columnsOrder as $columnName) {
                                        $columnName = trim($columnName);
                                        if (array_key_exists($columnName, $columns)) {
                                            $column = $columns[$columnName];
                                            $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                            $columnOffset += $column['_width'];
                                            unset($column['_width']);
                                            $line[] = $column;
                                        }
                                    }
                                }

                                $drawItems[$optionId]['lines'][] = $line;
                            }

                            // custom options
                            $options = $item->getOrderItem()->getProductOptions();
                            if ($options) {
                                if (isset($options['options'])) {
                                    foreach ($options['options'] as $option) {
                                        $lines = array();
                                        $lines[][] = array(
                                            'text' => Mage::helper('core/string')->str_split(strip_tags($option['label']), 40, true, true),
                                            'font' => 'italic',
                                            'feed' => 35
                                        );

                                        if (isset($option['value'])) {
                                            $text = array();
                                            $_printValue = isset($option['print_value'])
                                                ? $option['print_value']
                                                : strip_tags($option['value']);
                                            $values = explode(', ', $_printValue);
                                            foreach ($values as $value) {
                                                foreach (Mage::helper('core/string')->str_split($value, 30, true, true) as $_value) {
                                                    $text[] = $_value;
                                                }
                                            }

                                            $lines[][] = array(
                                                'text' => $text,
                                                'feed' => 40
                                            );
                                        }

                                        $drawItems[] = array(
                                            'lines'  => $lines,
                                            'height' => 15
                                        );
                                    }
                                }
                            }

                            $page = $pdf->drawLineBlocks($page, $drawItems, array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Default.php.xhtml index 187b528..0a763e9 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Default.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Default.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Default.php

                    Source of file Default.php

                    - Size: 6,355 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Default.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    /**
                     * Default item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    class FireGento_Pdf_Model_Items_Default extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Default
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();
                            $lines = array();

                            $fontSize = 9;

                            // draw Position Number
                            $lines[0] = array(
                                array(
                                    'text'      => $position,
                                    'feed'      => $pdf->margin['left'] + 10,
                                    'align'     => 'right',
                                    'font_size' => $fontSize
                                )
                            );

                            // draw SKU
                            $lines[0][] = array(
                                'text' => Mage::helper('core/string')->str_split($this->getSku($item), 19),
                                'feed' => $pdf->margin['left'] + 25,
                                'font_size' => $fontSize
                            );

                            // draw Product name
                            $lines[0][] = array(
                                'text' => Mage::helper('core/string')->str_split($item->getName(), 40, true, true),
                                'feed' => $pdf->margin['left'] + 130,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    $optionTxt = $option['label'] . ': ';
                                    // append option value
                                    if ($option['value']) {
                                        $optionTxt .= isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                                    }
                                    $optionArray = $pdf->_prepareText($optionTxt, $page, $pdf->getFontRegular(), $fontSize, 215);
                                    $lines[][] = array(
                                        'text' => $optionArray,
                                        'feed' => $pdf->margin['left'] + 135
                                    );
                                }
                            }

                            $columns = array();
                            // prepare qty
                            $columns['qty'] = array(
                                'text'      => $item->getQty() * 1,
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width' => 30
                            );

                            // prepare price
                            $columns['price'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare price_incl_tax
                            $columns['price_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getPriceInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare tax
                            $columns['tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getTaxAmount() + $item->getHiddenTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare tax_rate
                            $columns['tax_rate'] = array(
                                'text'      => round($item->getOrderItem()->getTaxPercent(), 2) . '%',
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal
                            $columns['subtotal'] = array(
                                'text'      => $order->formatPriceTxt($item->getRowTotal()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal_incl_tax
                            $columns['subtotal_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getRowTotalInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 70
                            );

                            // draw columns in specified order
                            $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                            // draw starting from right
                            $columnsOrder = array_reverse($columnsOrder);
                            $columnOffset = 0;
                            foreach ($columnsOrder as $columnName) {
                                $columnName = trim($columnName);
                                if (array_key_exists($columnName, $columns)) {
                                    $column = $columns[$columnName];
                                    $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                    $columnOffset += $column['_width'];
                                    unset($column['_width']);
                                    $lines[0][] = $column;
                                }
                            }

                            if (Mage::getStoreConfig('sales_pdf/invoice/show_item_discount') && 0 < $item->getDiscountAmount()) {
                                // print discount
                                $text = Mage::helper('firegento_pdf')->__(
                                    'You get a discount of %s.',
                                    $order->formatPriceTxt($item->getDiscountAmount())
                                );
                                $lines[][] = array(
                                    'text'  => $text,
                                    'align' => 'right',
                                    'feed'  => $pdf->margin['right'] - $columnOffset
                                );
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    + Size: 6,247 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Default.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Default item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Default extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Default
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();
                            $helper = Mage::helper('firegento_pdf');
                            $lines = array();

                            $fontSize = 9;

                            // draw Position Number
                            $lines[0] = array(
                                array(
                                    'text'      => $position,
                                    'feed'      => $pdf->margin['left'] + 10,
                                    'align'     => 'right',
                                    'font_size' => $fontSize
                                )
                            );

                            // draw SKU
                            $lines[0][] = array(
                                'text' => Mage::helper('core/string')->str_split($this->getSku($item), 19),
                                'feed' => $pdf->margin['left'] + 25,
                                'font_size' => $fontSize
                            );

                            // draw Product name
                            $lines[0][] = array(
                                'text' => Mage::helper('core/string')->str_split($item->getName(), 40, true, true),
                                'feed' => $pdf->margin['left'] + 130,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    $optionTxt = $option['label'] . ': ';
                                    // append option value
                                    if (isset($option['value'])) {
                                        $optionTxt .= isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                                    }

                                    $optionArray = $pdf->_prepareText($optionTxt, $page, $pdf->getFontRegular(), $fontSize, 215);
                                    $lines[][] = array(
                                        'text'  => $optionArray,
                                        'feed'  => $pdf->margin['left'] + 135,
                                        'color' => $helper->getLabelColor(),
                                    );
                                }
                            }

                            $columns = array();
                            // prepare qty
                            $columns['qty'] = array(
                                'text'      => $item->getQty() * 1,
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width' => 30
                            );

                            // prepare price
                            $columns['price'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare price_incl_tax
                            $columns['price_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getPriceInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare tax
                            $columns['tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getTaxAmount() + $item->getHiddenTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare tax_rate
                            $columns['tax_rate'] = array(
                                'text'      => round($item->getOrderItem()->getTaxPercent(), 2) . '%',
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal
                            $columns['subtotal'] = array(
                                'text'      => $order->formatPriceTxt($item->getRowTotal()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal_incl_tax
                            $columns['subtotal_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getRowTotalInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 70
                            );

                            // draw columns in specified order
                            $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                            // draw starting from right
                            $columnsOrder = array_reverse($columnsOrder);
                            $columnOffset = 0;
                            foreach ($columnsOrder as $columnName) {
                                $columnName = trim($columnName);
                                if (array_key_exists($columnName, $columns)) {
                                    $column = $columns[$columnName];
                                    $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                    $columnOffset += $column['_width'];
                                    unset($column['_width']);
                                    $lines[0][] = $column;
                                }
                            }

                            if (Mage::getStoreConfig('sales_pdf/invoice/show_item_discount') && 0 < $item->getDiscountAmount()) {
                                // print discount
                                $text = Mage::helper('firegento_pdf')->__(
                                    'You get a discount of %s.',
                                    $order->formatPriceTxt($item->getDiscountAmount())
                                );
                                $lines[][] = array(
                                    'text'  => $text,
                                    'align' => 'right',
                                    'feed'  => $pdf->margin['right'] - $columnOffset
                                );
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xhtml index 079025a..48e1bce 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Downloadable.php

                    Source of file Downloadable.php

                    - Size: 7,059 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */

                    /**
                     * Class FireGento_Pdf_Model_Items_Downloadable
                     *
                     * @category FireGento
                     * @package  FireGento_Pdf
                     * @author   FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Downloadable
                        extends Mage_Downloadable_Model_Sales_Order_Pdf_Items_Invoice
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();
                            $lines = array();

                            $fontSize = 9;

                            // draw Position Number
                            $lines[0] = array(
                                array(
                                    'text'      => $position,
                                    'feed'      => $pdf->margin['left'] + 10,
                                    'align'     => 'right',
                                    'font_size' => $fontSize
                                )
                            );

                            // draw SKU
                            $lines[0][] = array(
                                'text'      => Mage::helper('core/string')
                                    ->str_split($this->getSku($item), 19),
                                'feed'      => $pdf->margin['left'] + 25,
                                'font_size' => $fontSize
                            );

                            // draw Product name
                            $lines[0][] = array(
                                'text'      => Mage::helper('core/string')
                                    ->str_split($item->getName(), 40, true, true),
                                'feed'      => $pdf->margin['left'] + 130,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    $optionTxt = $option['label'] . ': ';
                                    // append option value
                                    if ($option['value']) {
                                        $optionTxt .= isset($option['print_value'])
                                            ? $option['print_value'] : strip_tags($option['value']);
                                    }
                                    $optionArray = $pdf->_prepareText($optionTxt, $page,
                                        $pdf->getFontRegular(), $fontSize, 215);
                                    $lines[][] = array(
                                        'text' => $optionArray,
                                        'feed' => $pdf->margin['left'] + 135
                                    );
                                }
                            }

                            // downloadable Items
                            $_purchasedItems = $this->getLinks()->getPurchasedItems();

                            // draw Links title
                            $lines[][] = array(
                                'text' => Mage::helper('core/string')
                                    ->str_split($this->getLinksTitle(), 70, true, true),
                                'feed' => $pdf->margin['left'] + 130,
                                'font' => 'italic',
                            );

                            // draw Links
                            foreach ($_purchasedItems as $_link) {
                                $lines[][] = array(
                                    'text' => Mage::helper('core/string')
                                        ->str_split($_link->getLinkTitle(), 50, true, true),
                                    'feed' => $pdf->margin['left'] + 135
                                );
                            }


                            $columns = array();
                            // prepare qty
                            $columns['qty'] = array(
                                'text'      => $item->getQty() * 1,
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 30
                            );

                            // prepare price
                            $columns['price'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare price_incl_tax
                            $columns['price_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getPriceInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare tax
                            $columns['tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare tax_rate
                            $columns['tax_rate'] = array(
                                'text'      => round($item->getOrderItem()->getTaxPercent(), 2)
                                    . '%',
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal
                            $columns['subtotal'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice()
                                    * $item->getQty() * 1),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal_incl_tax
                            $columns['subtotal_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt(($item->getPrice()
                                        * $item->getQty() * 1) + $item->getTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 70
                            );

                            // draw columns in specified order
                            $columnsOrder = explode(',',
                                Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                            // draw starting from right
                            $columnsOrder = array_reverse($columnsOrder);
                            $columnOffset = 0;
                            foreach ($columnsOrder as $columnName) {
                                $columnName = trim($columnName);
                                if (array_key_exists($columnName, $columns)) {
                                    $column = $columns[$columnName];
                                    $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                    $columnOffset += $column['_width'];
                                    unset($column['_width']);
                                    $lines[0][] = $column;
                                }
                            }

                            if (Mage::getStoreConfig('sales_pdf/invoice/show_item_discount')
                                && 0 < $item->getDiscountAmount()
                            ) {
                                // print discount
                                $text = Mage::helper('firegento_pdf')->__(
                                    'You get a discount of %s.',
                                    $order->formatPriceTxt($item->getDiscountAmount())
                                );
                                $lines[][] = array(
                                    'text'  => $text,
                                    'align' => 'right',
                                    'feed'  => $pdf->margin['right'] - $columnOffset
                                );
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock),
                                array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    + Size: 7,054 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Class FireGento_Pdf_Model_Items_Downloadable
                     *
                     * @category FireGento
                     * @package  FireGento_Pdf
                     * @author   FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Downloadable
                        extends Mage_Downloadable_Model_Sales_Order_Pdf_Items_Invoice
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $order = $this->getOrder();
                            $item = $this->getItem();
                            $pdf = $this->getPdf();
                            $page = $this->getPage();
                            $helper = Mage::helper('firegento_pdf');
                            $lines = array();

                            $fontSize = 9;

                            // draw Position Number
                            $lines[0] = array(
                                array(
                                    'text'      => $position,
                                    'feed'      => $pdf->margin['left'] + 10,
                                    'align'     => 'right',
                                    'font_size' => $fontSize
                                )
                            );

                            // draw SKU
                            $lines[0][] = array(
                                'text'      => Mage::helper('core/string')
                                    ->str_split($this->getSku($item), 19),
                                'feed'      => $pdf->margin['left'] + 25,
                                'font_size' => $fontSize
                            );

                            // draw Product name
                            $lines[0][] = array(
                                'text'      => Mage::helper('core/string')
                                    ->str_split($item->getName(), 40, true, true),
                                'feed'      => $pdf->margin['left'] + 130,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    $optionTxt = $option['label'] . ': ';
                                    // append option value
                                    if (isset($option['value'])) {
                                        $optionTxt .= isset($option['print_value'])? $option['print_value'] : strip_tags($option['value']);
                                    }

                                    $optionArray = $pdf->_prepareText($optionTxt, $page, $pdf->getFontRegular(), $fontSize, 215);
                                    $lines[][] = array(
                                        'text'  => $optionArray,
                                        'feed'  => $pdf->margin['left'] + 135,
                                        'color' => $helper->getLabelColor(),
                                    );
                                }
                            }

                            // downloadable Items
                            $_purchasedItems = $this->getLinks()->getPurchasedItems();

                            // draw Links title
                            $lines[][] = array(
                                'text' => Mage::helper('core/string')
                                    ->str_split($this->getLinksTitle(), 70, true, true),
                                'feed' => $pdf->margin['left'] + 130,
                                'font' => 'italic',
                            );

                            // draw Links
                            foreach ($_purchasedItems as $_link) {
                                $lines[][] = array(
                                    'text' => Mage::helper('core/string')
                                        ->str_split($_link->getLinkTitle(), 50, true, true),
                                    'feed' => $pdf->margin['left'] + 135
                                );
                            }


                            $columns = array();
                            // prepare qty
                            $columns['qty'] = array(
                                'text'      => $item->getQty() * 1,
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 30
                            );

                            // prepare price
                            $columns['price'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare price_incl_tax
                            $columns['price_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getPriceInclTax()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 60
                            );

                            // prepare tax
                            $columns['tax'] = array(
                                'text'      => $order->formatPriceTxt($item->getTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare tax_rate
                            $columns['tax_rate'] = array(
                                'text'      => round($item->getOrderItem()->getTaxPercent(), 2) . '%',
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal
                            $columns['subtotal'] = array(
                                'text'      => $order->formatPriceTxt($item->getPrice() * $item->getQty() * 1),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 50
                            );

                            // prepare subtotal_incl_tax
                            $columns['subtotal_incl_tax'] = array(
                                'text'      => $order->formatPriceTxt(($item->getPrice() * $item->getQty() * 1) + $item->getTaxAmount()),
                                'align'     => 'right',
                                'font_size' => $fontSize,
                                '_width'    => 70
                            );

                            // draw columns in specified order
                            $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order'));
                            // draw starting from right
                            $columnsOrder = array_reverse($columnsOrder);
                            $columnOffset = 0;
                            foreach ($columnsOrder as $columnName) {
                                $columnName = trim($columnName);
                                if (array_key_exists($columnName, $columns)) {
                                    $column = $columns[$columnName];
                                    $column['feed'] = $pdf->margin['right'] - $columnOffset;
                                    $columnOffset += $column['_width'];
                                    unset($column['_width']);
                                    $lines[0][] = $column;
                                }
                            }

                            if (Mage::getStoreConfig('sales_pdf/invoice/show_item_discount')
                                && 0 < $item->getDiscountAmount()
                            ) {
                                // print discount
                                $text = Mage::helper('firegento_pdf')->__(
                                    'You get a discount of %s.',
                                    $order->formatPriceTxt($item->getDiscountAmount())
                                );
                                $lines[][] = array(
                                    'text'  => $text,
                                    'align' => 'right',
                                    'feed'  => $pdf->margin['right'] - $columnOffset
                                );
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xhtml index 665c6a8..9e81e61 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Grouped.php

                    Source of file Grouped.php

                    - Size: 1,770 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php

                    12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Default item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    class FireGento_Pdf_Model_Items_Grouped extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $type = $this->getItem()->getOrderItem()->getRealProductType();
                            $renderer = $this->getRenderedModel()->getRenderer($type);
                            $renderer->setOrder($this->getOrder());
                            $renderer->setItem($this->getItem());
                            $renderer->setPdf($this->getPdf());
                            $renderer->setPage($this->getPage());

                            $renderer->draw($position);
                            $this->setPage($renderer->getPage());
                        }
                    }

                    + Size: 1,625 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php

                    1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Default item model rewrite.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Grouped extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped
                    {
                        /**
                         * Draw item line.
                         *
                         * @param  int $position position of the product
                         *
                         * @return void
                         */
                        public function draw($position = 1)
                        {
                            $type = $this->getItem()->getOrderItem()->getRealProductType();
                            $renderer = $this->getRenderedModel()->getRenderer($type);
                            $renderer->setOrder($this->getOrder());
                            $renderer->setItem($this->getItem());
                            $renderer->setPdf($this->getPdf());
                            $renderer->setPage($this->getPage());

                            $renderer->draw($position);
                            $this->setPage($renderer->getPage());
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xhtml index 20dc2ea..5e98339 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Bundle.php

                    Source of file Bundle.php

                    - Size: 6,253 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Shipment bundle item model.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    class FireGento_Pdf_Model_Items_Shipment_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment
                    {
                        /**
                         * Draw item line.
                         *
                         * @return void
                         */
                        public function draw()
                        {
                            $item   = $this->getItem();
                            $pdf    = $this->getPdf();
                            $page   = $this->getPage();

                            $this->_setFontRegular();

                            $shipItems = $this->getChilds($item);
                            $items = array_merge(array($item->getOrderItem()), $item->getOrderItem()->getChildrenItems());

                            $_prevOptionId = '';
                            $drawItems = array();

                            foreach ($items as $_item) {
                                $line   = array();

                                $attributes = $this->getSelectionAttributes($_item);
                                if (is_array($attributes)) {
                                    $optionId   = $attributes['option_id'];
                                } else {
                                    $optionId = 0;
                                }

                                if (!isset($drawItems[$optionId])) {
                                    $drawItems[$optionId] = array(
                                        'lines'  => array(),
                                        'height' => 15
                                    );
                                }

                                if ($_item->getParentItem()) {
                                    if ($_prevOptionId != $attributes['option_id']) {
                                        $line[0] = array(
                                            'font'  => 'italic',
                                            'text'  => Mage::helper('core/string')->str_split($attributes['option_label'], 60, true, true),
                                            'feed'  => 150
                                        );

                                        $drawItems[$optionId] = array(
                                            'lines'  => array($line),
                                            'height' => 15
                                        );

                                        $line = array();

                                        $_prevOptionId = $attributes['option_id'];
                                    }
                                }

                                // draw SKUs
                                if (!$_item->getParentItem()) {
                                    $text = array();
                                    foreach (Mage::helper('core/string')->str_split($_item->getSku(), 20) as $part) {
                                        $text[] = $part;
                                    }
                                    $line[] = array(
                                        'text'  => $text,
                                        'feed' => 45,
                                        'width' => 85
                                    );
                                }

                                // draw Name
                                if ($_item->getParentItem()) {
                                    $name = $this->getValueHtml($_item);
                                } else {
                                    $name = $_item->getName();
                                }
                                $text = array();
                                foreach (Mage::helper('core/string')->str_split($name, 60, true, true) as $part) {
                                    $text[] = $part;
                                }
                                $line[] = array(
                                    'text'  => $text,
                                    'feed'  => 150,
                                    'align' => 'left',
                                    'width' => 375
                                );

                                if (($this->isShipmentSeparately() && $_item->getParentItem())
                                    || (!$this->isShipmentSeparately() && !$_item->getParentItem())
                                ) {
                                    if (isset($shipItems[$_item->getId()])) {
                                        $qty = $shipItems[$_item->getId()]->getQty()*1;
                                    } elseif ($_item->getIsVirtual()) {
                                        $qty = Mage::helper('bundle')->__('N/A');
                                    } else {
                                        $qty = 0;
                                    }
                                } else {
                                    $qty = '';
                                }

                                $line[] = array(
                                    'text'  => $qty,
                                    'feed'  => 505,
                                    'align' => 'left',
                                    'width' => 10
                                );

                                $drawItems[$optionId]['lines'][] = $line;
                            }

                            // custom options
                            $options = $item->getOrderItem()->getProductOptions();
                            if ($options) {
                                if (isset($options['options'])) {
                                    foreach ($options['options'] as $option) {
                                        $lines = array();
                                        $lines[][] = array(
                                            'text'  => Mage::helper('core/string')->str_split(strip_tags($option['label']), 70, true, true),
                                            'font'  => 'italic',
                                            'feed'  => 60
                                        );

                                        if ($option['value']) {
                                            $text = array();
                                            $_printValue = isset($option['print_value'])
                                                ? $option['print_value']
                                                : strip_tags($option['value']);
                                            $values = explode(', ', $_printValue);
                                            foreach ($values as $value) {
                                                foreach (Mage::helper('core/string')->str_split($value, 50, true, true) as $_value) {
                                                    $text[] = $_value;
                                                }
                                            }

                                            $lines[][] = array(
                                                'text'  => $text,
                                                'feed'  => 65
                                            );
                                        }

                                        $drawItems[] = array(
                                            'lines'  => $lines,
                                            'height' => 15
                                        );
                                    }
                                }
                            }

                            $page = $pdf->drawLineBlocks($page, $drawItems, array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    + Size: 6,043 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Shipment bundle item model.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Shipment_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment
                    {
                        /**
                         * Draw item line.
                         *
                         * @return void
                         */
                        public function draw()
                        {
                            $item   = $this->getItem();
                            $pdf    = $this->getPdf();
                            $page   = $this->getPage();

                            $shipItems = $this->getChilds($item);
                            $items = array_merge(array($item->getOrderItem()), $item->getOrderItem()->getChildrenItems());

                            $_prevOptionId = '';
                            $drawItems = array();

                            foreach ($items as $_item) {
                                $line   = array();

                                $attributes = $this->getSelectionAttributes($_item);
                                if (is_array($attributes)) {
                                    $optionId   = $attributes['option_id'];
                                } else {
                                    $optionId = 0;
                                }

                                if (!isset($drawItems[$optionId])) {
                                    $drawItems[$optionId] = array(
                                        'lines'  => array(),
                                        'height' => 15
                                    );
                                }

                                if ($_item->getParentItem()) {
                                    if ($_prevOptionId != $attributes['option_id']) {
                                        $line[0] = array(
                                            'font'  => 'italic',
                                            'text'  => Mage::helper('core/string')->str_split($attributes['option_label'], 60, true, true),
                                            'feed'  => 150
                                        );

                                        $drawItems[$optionId] = array(
                                            'lines'  => array($line),
                                            'height' => 15
                                        );

                                        $line = array();

                                        $_prevOptionId = $attributes['option_id'];
                                    }
                                }

                                // draw SKUs
                                if (!$_item->getParentItem()) {
                                    $text = array();
                                    foreach (Mage::helper('core/string')->str_split($_item->getSku(), 20) as $part) {
                                        $text[] = $part;
                                    }

                                    $line[] = array(
                                        'text'  => $text,
                                        'feed' => 45,
                                        'width' => 85
                                    );
                                }

                                // draw Name
                                if ($_item->getParentItem()) {
                                    $name = $this->getValueHtml($_item);
                                } else {
                                    $name = $_item->getName();
                                }

                                $text = array();
                                foreach (Mage::helper('core/string')->str_split($name, 60, true, true) as $part) {
                                    $text[] = $part;
                                }

                                $line[] = array(
                                    'text'  => $text,
                                    'feed'  => 150,
                                    'align' => 'left',
                                    'width' => 375
                                );

                                if (($this->isShipmentSeparately() && $_item->getParentItem())
                                    || (!$this->isShipmentSeparately() && !$_item->getParentItem())
                                ) {
                                    if (isset($shipItems[$_item->getId()])) {
                                        $qty = $shipItems[$_item->getId()]->getQty()*1;
                                    } elseif ($_item->getIsVirtual()) {
                                        $qty = Mage::helper('bundle')->__('N/A');
                                    } else {
                                        $qty = 0;
                                    }
                                } else {
                                    $qty = '';
                                }

                                $line[] = array(
                                    'text'  => $qty,
                                    'feed'  => 505,
                                    'align' => 'left',
                                    'width' => 10
                                );

                                $drawItems[$optionId]['lines'][] = $line;
                            }

                            // custom options
                            $options = $item->getOrderItem()->getProductOptions();
                            if ($options) {
                                if (isset($options['options'])) {
                                    foreach ($options['options'] as $option) {
                                        $lines = array();
                                        $lines[][] = array(
                                            'text'  => Mage::helper('core/string')->str_split(strip_tags($option['label']), 70, true, true),
                                            'font'  => 'italic',
                                            'feed'  => 60
                                        );

                                        if (isset($option['value'])) {
                                            $text = array();
                                            $_printValue = isset($option['print_value'])
                                                ? $option['print_value']
                                                : strip_tags($option['value']);
                                            $values = explode(', ', $_printValue);
                                            foreach ($values as $value) {
                                                foreach (Mage::helper('core/string')->str_split($value, 50, true, true) as $_value) {
                                                    $text[] = $_value;
                                                }
                                            }

                                            $lines[][] = array(
                                                'text'  => $text,
                                                'feed'  => 65
                                            );
                                        }

                                        $drawItems[] = array(
                                            'lines'  => $lines,
                                            'height' => 15
                                        );
                                    }
                                }
                            }

                            $page = $pdf->drawLineBlocks($page, $drawItems, array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xhtml index f4a0f18..8b2ee73 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Default.php

                    Source of file Default.php

                    - Size: 3,553 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                    /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
                    <?php
                    /**
                     * This file is part of the FIREGENTO project.
                     *
                     * FireGento_Pdf is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    /**
                     * Shipment default item model.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2013 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     * @version   $Id:$
                     * @since     0.1.0
                     */
                    class FireGento_Pdf_Model_Items_Shipment_Default extends Mage_Sales_Model_Order_Pdf_Items_Shipment_Default
                    {
                        /**
                         * Draw item line.
                         *
                         * @return void
                         */
                        public function draw()
                        {
                            $item   = $this->getItem();
                            $pdf    = $this->getPdf();
                            $page   = $this->getPage();
                            $lines  = array();

                            $fontSize = 9;

                            // draw SKU
                            $lines[0] = array(array(
                                'text' => Mage::helper('core/string')->str_split($this->getSku($item), 20),
                                'feed' => 45,
                                'width' => 85,
                                'font_size' => $fontSize
                            ));

                            // draw Product name
                            $lines[0][] = array(
                                'text'  => Mage::helper('core/string')->str_split($item->getName(), 70, true, true),
                                'feed'  => 150,
                                'align' => 'left',
                                'width' => 375,
                                'font_size' => $fontSize
                            );

                            // draw QTY
                            $lines[0][] = array(
                                'text'  => $item->getQty()*1,
                                'feed'  => 505,
                                'align' => 'left',
                                'width' => 10,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    // draw options label
                                    $lines[][] = array(
                                        'text' => Mage::helper('core/string')->str_split(strip_tags($option['label']), 40, false, true),
                                        'font' => 'bold',
                                        'feed' => $pdf->margin['left'] + 130
                                    );

                                    // draw options value
                                    if ($option['value']) {
                                        $_printVal = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                                        $values = explode(', ', $_printVal);
                                        foreach ($values as $value) {
                                            $lines[][] = array(
                                                'text' => Mage::helper('core/string')->str_split($value, 60, true, true),
                                                'feed' => $pdf->margin['left'] + 130
                                            );
                                        }
                                    }
                                }
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    + Size: 3,335 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php

                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
                    <?php
                    /**
                     * This file is part of a FireGento e.V. module.
                     *
                     * This FireGento e.V. module is free software; you can redistribute it and/or
                     * modify it under the terms of the GNU General Public License version 3 as
                     * published by the Free Software Foundation.
                     *
                     * This script is distributed in the hope that it will be useful, but WITHOUT
                     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                     *
                     * PHP version 5
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     * @copyright 2014 FireGento Team (http://www.firegento.com)
                     * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                     */
                    /**
                     * Shipment default item model.
                     *
                     * @category  FireGento
                     * @package   FireGento_Pdf
                     * @author    FireGento Team <team@firegento.com>
                     */
                    class FireGento_Pdf_Model_Items_Shipment_Default extends Mage_Sales_Model_Order_Pdf_Items_Shipment_Default
                    {
                        /**
                         * Draw item line.
                         *
                         * @return void
                         */
                        public function draw()
                        {
                            $item   = $this->getItem();
                            $pdf    = $this->getPdf();
                            $page   = $this->getPage();
                            $lines  = array();

                            $fontSize = 9;

                            // draw SKU
                            $lines[0] = array(array(
                                'text' => Mage::helper('core/string')->str_split($this->getSku($item), 20),
                                'feed' => 45,
                                'width' => 85,
                                'font_size' => $fontSize
                            ));

                            // draw Product name
                            $lines[0][] = array(
                                'text'  => Mage::helper('core/string')->str_split($item->getName(), 70, true, true),
                                'feed'  => 150,
                                'align' => 'left',
                                'width' => 375,
                                'font_size' => $fontSize
                            );

                            // draw QTY
                            $lines[0][] = array(
                                'text'  => $item->getQty()*1,
                                'feed'  => 505,
                                'align' => 'left',
                                'width' => 10,
                                'font_size' => $fontSize
                            );

                            $options = $this->getItemOptions();
                            if ($options) {
                                foreach ($options as $option) {
                                    // draw options label
                                    $lines[][] = array(
                                        'text' => Mage::helper('core/string')->str_split(strip_tags($option['label']), 40, false, true),
                                        'font' => 'bold',
                                        'feed' => $pdf->margin['left'] + 130
                                    );

                                    // draw options value
                                    if (isset($option['value'])) {
                                        $_printVal = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
                                        $values = explode(', ', $_printVal);
                                        foreach ($values as $value) {
                                            $lines[][] = array(
                                                'text' => Mage::helper('core/string')->str_split($value, 60, true, true),
                                                'feed' => $pdf->margin['left'] + 130
                                            );
                                        }
                                    }
                                }
                            }

                            $lineBlock = array(
                                'lines'  => $lines,
                                'height' => 15
                            );

                            $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true));
                            $this->setPage($page);
                        }
                    }

                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/index.xhtml index 0edc126..d4dc971 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Shipment/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

                    Source of FireGento_Pdf

                    - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                    • @@ -101,17 +101,17 @@ Bundle.php - 6.1 KB + 5.9 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 Default.php - 3.5 KB + 3.3 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xhtml new file mode 100644 index 0000000..498b659 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Default.php

                      Source of file Default.php

                      + Size: 1,239 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php

                      123456789101112131415161718192021222324252627282930313233343536373839
                      <?php
                      /**
                       * This file is part of a FireGento e.V. module.
                       *
                       * This FireGento e.V. module is free software; you can redistribute it and/or
                       * modify it under the terms of the GNU General Public License version 3 as
                       * published by the Free Software Foundation.
                       *
                       * This script is distributed in the hope that it will be useful, but WITHOUT
                       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                       *
                       * PHP version 5
                       *
                       * @category  FireGento
                       * @package   FireGento_Pdf
                       * @author    FireGento Team <team@firegento.com>
                       * @copyright 2014 FireGento Team (http://www.firegento.com)
                       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                       */
                      /**
                       * Default item model rewrite.
                       *
                       * @category  FireGento
                       * @package   FireGento_Pdf
                       * @author    FireGento Team <team@firegento.com>
                       */
                      class FireGento_Pdf_Model_Items_Unirgy_Default extends FireGento_Pdf_Model_Items_Default
                      {

                          public function getItemOptions()
                          {
                              $result = parent::getItemOptions();
                              Mage::helper('ugiftcert')->addOrderItemCertOptions($result, $this->getItem());
                              return $result;
                          }

                      }

                      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xhtml new file mode 100644 index 0000000..868e9a7 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Default.php

                      Source of file Default.php

                      + Size: 1,257 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php

                      123456789101112131415161718192021222324252627282930313233343536373839
                      <?php
                      /**
                       * This file is part of a FireGento e.V. module.
                       *
                       * This FireGento e.V. module is free software; you can redistribute it and/or
                       * modify it under the terms of the GNU General Public License version 3 as
                       * published by the Free Software Foundation.
                       *
                       * This script is distributed in the hope that it will be useful, but WITHOUT
                       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                       *
                       * PHP version 5
                       *
                       * @category  FireGento
                       * @package   FireGento_Pdf
                       * @author    FireGento Team <team@firegento.com>
                       * @copyright 2014 FireGento Team (http://www.firegento.com)
                       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                       */
                      /**
                       * Default item model rewrite.
                       *
                       * @category  FireGento
                       * @package   FireGento_Pdf
                       * @author    FireGento Team <team@firegento.com>
                       */
                      class FireGento_Pdf_Model_Items_Unirgy_Shipment_Default extends FireGento_Pdf_Model_Items_Shipment_Default
                      {

                          public function getItemOptions()
                          {
                              $result = parent::getItemOptions();
                              Mage::helper('ugiftcert')->addOrderItemCertOptions($result, $this->getItem());
                              return $result;
                          }

                      }

                      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/index.xhtml new file mode 100644 index 0000000..072f3ab --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/index.xhtml @@ -0,0 +1,126 @@ + + + + + phpDox - Overview + + + + + +
                      +
                      + +
                      +

                      Source of FireGento_Pdf

                      +

                      + This project consists of 43 directories, containing + a total of 45 files. +

                      + + + + + + + + + + + + + + + +
                      NameSizeLast Modified
                      + Default.php + 1.2 KB + 2018-03-12T19:59:19+00:00
                      + + Total: 1 files +
                      +
                      +
                      + +
                      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/index.xhtml new file mode 100644 index 0000000..c94af73 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/Unirgy/index.xhtml @@ -0,0 +1,129 @@ + + + + + phpDox - Overview + + + + + +
                      +
                      + +
                      +

                      Source of FireGento_Pdf

                      +

                      + This project consists of 43 directories, containing + a total of 45 files. +

                      + + + + + + + + + + + + + + + + + + + + +
                      NameSizeLast Modified
                      + Default.php + 1.2 KB + 2018-03-12T19:59:19+00:00
                      + + Shipment + +   
                      + + Total: 1 directories,1 files +
                      +
                      +
                      + +
                      + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/index.xhtml index 6c79edb..a2389f6 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Items/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                      Source of FireGento_Pdf

                      - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                      • @@ -95,17 +95,17 @@ Bundle.php - 8.9 KB + 8.7 KB - 2014-10-26T15:22:24+01:00 + 2018-03-12T19:59:19+00:00 Default.php - 6.2 KB + 6.1 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 @@ -113,15 +113,15 @@ 6.9 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 Grouped.php - 1.7 KB + 1.6 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 @@ -132,10 +132,19 @@     + + + + Unirgy + + +   +   + - Total: 1 directories,4 files + Total: 2 directories,4 files diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Observer.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Observer.php.xhtml index 8abe049..07a3580 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Observer.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Observer.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Observer.php

                        Source of file Observer.php

                        - Size: 7,539 Bytes - Last Modified: 2014-11-08T19:25:48+01:00

                        /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Observer.php

                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
                        <?php
                        /**
                         * This file is part of the FIREGENTO project.
                         *
                         * FireGento_Pdf is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         * @version   $Id:$
                         * @since     0.1.0
                         */
                        /**
                         * FireGento Pdf observer.
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         * @version   $Id:$
                         * @since     0.1.0
                         */
                        class FireGento_Pdf_Model_Observer
                        {
                            /**
                             * Add notes to invoice document.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addInvoiceNotes(Varien_Event_Observer $observer)
                            {
                                $this->addInvoiceDateNotice($observer);
                                $this->addInvoiceMaturity($observer);
                                $this->addPaymentMethod($observer);
                                $this->addShippingMethod($observer);
                                $this->addInvoiceComments($observer);

                                return $this;
                            }

                            /**
                             * add invoice date notice to pdf
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return $this
                             */
                            public function addInvoiceDateNotice(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_date_notice')) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__('Invoice date is equal to delivery date.');
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add maturity to invoice notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addInvoiceMaturity(Varien_Event_Observer $observer)
                            {
                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                $maturity = Mage::getStoreConfig('sales_pdf/invoice/maturity');
                                if (!empty($maturity) || 0 < $maturity) {
                                    $maturity = Mage::helper('firegento_pdf')->__(
                                        'Invoice maturity: %s days', Mage::getStoreConfig('sales_pdf/invoice/maturity')
                                    );
                                } elseif ('0' === $maturity) {
                                    $maturity = Mage::helper('firegento_pdf')->__('Invoice is payable immediately');
                                }

                                $notes[] = $maturity;
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add payment method to invoice notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addPaymentMethod(Varien_Event_Observer $observer)
                            {
                                if (Mage::getStoreConfig('sales_pdf/invoice/payment_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_NOTE
                                ) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__(
                                    'Payment method: %s', $observer->getOrder()->getPayment()->getMethodInstance()->getTitle()
                                );
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add shipping method to invoice notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addShippingMethod(Varien_Event_Observer $observer)
                            {
                                $invoice = $observer->getInvoice();
                                $shipment = $observer->getShipment();
                                if (empty($invoice) && empty($shipment)
                                    || !empty($invoice) && Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_NOTE
                                    || !empty($shipment) && Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_NOTE
                                ) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__(
                                    'Shipping method: %s', $observer->getOrder()->getShippingDescription()
                                );
                                $result->setNotes($notes);
                                return $this;
                            }


                            /**
                             * Add the invoice comments
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addInvoiceComments(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_comments')) {
                                    return $this;
                                }

                                /** @var Mage_Sales_Model_Order_Invoice $invoice */
                                $invoice = $observer->getInvoice();

                                /** @var Mage_Sales_Model_Resource_Order_Invoice_Comment_Collection $commentsCollection */
                                $commentsCollection = $invoice->getCommentsCollection();
                                $commentsCollection->addVisibleOnFrontFilter();

                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                foreach ($commentsCollection as $comment) {
                                    /** @var $comment Mage_Sales_Model_Order_Invoice_Comment */
                                    $notes[] = $comment->getComment();
                                }

                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Adds a barcode representing the order number to the shipment if activated.
                             *
                             * @param  Varien_Event_Observer $observer observer which is passed by magento
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addBarcode(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/shipment/order_id_as_barcode')) {
                                    return $this;
                                }
                                $page = $observer->getPage();
                                $order = $observer->getOrder();

                                $barcodeConfig = array(
                                    'drawText' => false,
                                    'orientation' => 90,
                                    'text' => $order->getIncrementId()
                                );
                                $rendererConfig = array(
                                    'verticalPosition' => 'middle',
                                    'moduleSize' => 0.9
                                );
                                // create dummy Zend_Pdf object, which just stores the current page, so that we can pass it in
                                // Zend_Barcode_Renderer_Pdf->setResource()
                                $pdf = new Zend_Pdf();
                                $pdf->pages[] = $page;
                                /** @var $renderer Zend_Barcode_Renderer_Pdf */
                                $renderer = Zend_Barcode::factory('code128', 'pdf', $barcodeConfig, $rendererConfig)->setResource($pdf, 0);
                                // calculate left offset so that barcode is printed on the right with a little margin
                                $leftOffset = $page->getWidth() - $renderer->getBarcode()->getWidth(true) * $renderer->getModuleSize() - 10;
                                $renderer->setLeftOffset($leftOffset);
                                $renderer->draw();
                                return $this;
                            }
                        }

                        + Size: 11,791 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                        /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Observer.php

                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
                        <?php
                        /**
                         * This file is part of a FireGento e.V. module.
                         *
                         * This FireGento e.V. module is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2014 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         */
                        /**
                         * FireGento Pdf observer.
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         */
                        class FireGento_Pdf_Model_Observer
                        {
                            /**
                             * Add notes to invoice document.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addInvoiceNotes(Varien_Event_Observer $observer)
                            {
                                $this->_addShippingCountryNotes($observer);
                                $this->_addInvoiceDateNotice($observer);
                                $this->_addInvoiceMaturity($observer);
                                $this->_addPaymentMethod($observer, 'invoice');
                                $this->_addShippingMethod($observer);
                                $this->_addInvoiceComments($observer);

                                return $this;
                            }

                            /**
                             * Add notes based on shipping country
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return $this
                             */
                            protected function _addShippingCountryNotes(Varien_Event_Observer $observer)
                            {
                                $order = $observer->getOrder();
                                $shippingCountryNotes = Mage::helper('firegento_pdf/invoice')->getShippingCountryNotes($order);

                                if (!empty($shippingCountryNotes)) {
                                    $result  = $observer->getResult();
                                    $notes   = $result->getNotes();
                                    $notes = array_merge($notes, $shippingCountryNotes);
                                    $result->setNotes($notes);
                                }

                                return $this;
                            }

                            /**
                             * add invoice date notice to pdf
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return $this
                             */
                            protected function _addInvoiceDateNotice(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_date_notice')) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__('Invoice date is equal to delivery date.');
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add maturity to invoice notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addInvoiceMaturity(Varien_Event_Observer $observer)
                            {
                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                $maturity = Mage::getStoreConfig('sales_pdf/invoice/maturity');
                                if (!empty($maturity) || 0 < $maturity) {
                                    $maturity = Mage::helper('firegento_pdf')->__(
                                        'Invoice maturity: %s days', Mage::getStoreConfig('sales_pdf/invoice/maturity')
                                    );
                                } elseif ('0' === $maturity) {
                                    $maturity = Mage::helper('firegento_pdf')->__('Invoice is payable immediately');
                                }

                                $notes[] = $maturity;
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add payment method to invoice / creditmemo notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addPaymentMethod(Varien_Event_Observer $observer, $mode)
                            {
                                if (Mage::getStoreConfig('sales_pdf/' . $mode . '/payment_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_NOTE
                                ) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__(
                                    'Payment method: %s', $observer->getOrder()->getPayment()->getMethodInstance()->getTitle()
                                );
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add shipping method to invoice notes.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addShippingMethod(Varien_Event_Observer $observer)
                            {
                                $invoice = $observer->getInvoice();
                                $shipment = $observer->getShipment();
                                if (empty($invoice) && empty($shipment)
                                    || !empty($invoice) && Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_NOTE
                                    || !empty($shipment) && Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position')
                                    != FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_NOTE
                                ) {
                                    return $this;
                                }

                                $result = $observer->getResult();
                                $notes = $result->getNotes();
                                $notes[] = Mage::helper('firegento_pdf')->__(
                                    'Shipping method: %s', $observer->getOrder()->getShippingDescription()
                                );
                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add the invoice comments
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addInvoiceComments(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_comments')) {
                                    return $this;
                                }

                                /** @var Mage_Sales_Model_Order_Invoice $invoice */
                                $invoice = $observer->getInvoice();

                                /** @var Mage_Sales_Model_Resource_Order_Invoice_Comment_Collection $commentsCollection */
                                $commentsCollection = $invoice->getCommentsCollection();
                                $commentsCollection->addVisibleOnFrontFilter();

                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                foreach ($commentsCollection as $comment) {
                                    /** @var $comment Mage_Sales_Model_Order_Invoice_Comment */
                                    $notes[] = $comment->getComment();
                                }

                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add notes to shipment document.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addShipmentNotes(Varien_Event_Observer $observer)
                            {
                                $this->_addShippingMethod($observer);
                                $this->_addShipmentComments($observer);

                                return $this;
                            }

                            /**
                             * Add the shipment comments
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addShipmentComments(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/shipment/show_comments')) {
                                    return $this;
                                }

                                /** @var Mage_Sales_Model_Order_Shipment $shipment */
                                $shipment = $observer->getShipment();

                                /** @var Mage_Sales_Model_Resource_Order_Shipment_Comment_Collection $commentsCollection */
                                $commentsCollection = $shipment->getCommentsCollection();
                                $commentsCollection->addVisibleOnFrontFilter();

                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                foreach ($commentsCollection as $comment) {
                                    /** @var $comment Mage_Sales_Model_Order_Shipment_Comment */
                                    $notes[] = $comment->getComment();
                                }

                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Add notes to credit memo document.
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addCreditmemoNotes(Varien_Event_Observer $observer)
                            {
                                $this->_addPaymentMethod($observer, 'creditmemo');
                                $this->_addCreditmemoComments($observer);

                                return $this;
                            }

                            /**
                             * Add the credit memo comments
                             *
                             * @param  Varien_Event_Observer $observer observer object
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addCreditmemoComments(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/creditmemo/show_comments')) {
                                    return $this;
                                }

                                /** @var Mage_Sales_Model_Order_Creditmemo $creditmemo */
                                $creditmemo = $observer->getCreditmemo();

                                /** @var Mage_Sales_Model_Resource_Order_Creditmemo_Comment_Collection $commentsCollection */
                                $commentsCollection = $creditmemo->getCommentsCollection();
                                $commentsCollection->addVisibleOnFrontFilter();

                                $result = $observer->getResult();
                                $notes = $result->getNotes();

                                foreach ($commentsCollection as $comment) {
                                    /** @var $comment Mage_Sales_Model_Order_Creditmemo_Comment */
                                    $notes[] = $comment->getComment();
                                }

                                $result->setNotes($notes);
                                return $this;
                            }

                            /**
                             * Adds a barcode representing the order number to the invoice if activated
                             *
                             * @param Varien_Event_Observer $observer observer which is passed by magento
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addInvoiceBarcode(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/invoice/order_id_as_barcode')) {
                                    return $this;
                                }

                                return $this->_addBarcode($observer);
                            }

                            /**
                             * Adds a barcode representing the order number to the shipment if activated
                             *
                             * @param Varien_Event_Observer $observer observer which is passed by magento
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            public function addShipmentBarcode(Varien_Event_Observer $observer)
                            {
                                if (!Mage::getStoreConfigFlag('sales_pdf/shipment/order_id_as_barcode')) {
                                    return $this;
                                }

                                return $this->_addBarcode($observer);
                            }

                            /**
                             * Adds a barcode representing the order number to a PDF
                             *
                             * @param  Varien_Event_Observer $observer observer which is passed by magento
                             *
                             * @return FireGento_Pdf_Model_Observer
                             */
                            protected function _addBarcode(Varien_Event_Observer $observer)
                            {
                                $page = $observer->getPage();
                                $order = $observer->getOrder();

                                $barcodeConfig = array(
                                    'drawText' => false,
                                    'orientation' => 90,
                                    'barHeight' => 25,
                                    'text' => $order->getIncrementId()
                                );
                                $rendererConfig = array(
                                    'verticalPosition' => 'top',
                                    'moduleSize' => 1
                                );
                                // create dummy Zend_Pdf object, which just stores the current page, so that we can pass it in
                                $pdf = new Zend_Pdf();
                                $pdf->pages[] = $page;
                                /** @var $renderer Zend_Barcode_Renderer_Pdf */
                                $renderer = Zend_Barcode::factory('code128', 'pdf', $barcodeConfig, $rendererConfig)->setResource($pdf, 0);
                                // calculate left offset so that barcode is printed on the right with a little margin
                                $leftOffset = $page->getWidth() - $renderer->getBarcode()->getWidth(true) * $renderer->getModuleSize() - 10;
                                $renderer->setLeftOffset($leftOffset);
                                $renderer->setTopOffset(50);
                                $renderer->draw();
                                return $this;
                            }
                        }

                        Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                        diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Shipment.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Shipment.php.xhtml index 0da3b91..a693c4f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Shipment.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Shipment.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Shipment.php

                        Source of file Shipment.php

                        - Size: 2,243 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                        /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Shipment.php

                        12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
                        <?php
                        /**
                         * This file is part of the FIREGENTO project.
                         *
                         * FireGento_Pdf is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         * @version   $Id:$
                         * @since     0.1.0
                         */
                        /**
                         * Shipment model rewrite.
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         * @version   $Id:$
                         * @since     0.1.0
                         */
                        class FireGento_Pdf_Model_Shipment
                        {

                            /**
                             * The actual PDF engine responsible for rendering the file.
                             *
                             * @var Mage_Sales_Model_Order_Pdf_Abstract
                             */
                            private $_engine;

                            /**
                             * get pdf rendering engine
                             *
                             * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Shipment
                             */
                            protected function getEngine()
                            {
                                if (!$this->_engine) {
                                    $modelClass = Mage::getStoreConfig('sales_pdf/shipment/engine');
                                    $engine = Mage::getModel($modelClass);

                                    if (!$engine) {
                                        // Fallback to Magento standard shipment layout.
                                        $engine = new Mage_Sales_Model_Order_Pdf_Shipment();
                                    }

                                    $this->_engine = $engine;
                                }

                                return $this->_engine;
                            }

                            /**
                             * get PDF object
                             *
                             * @param  array|Varien_Data_Collection $shipments shipments to generate pdfs for
                             *
                             * @return mixed
                             */
                            public function getPdf($shipments = array())
                            {
                                return $this->getEngine()->getPdf($shipments);
                            }

                        }

                        + Size: 2,177 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                        /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Shipment.php

                        1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
                        <?php
                        /**
                         * This file is part of a FireGento e.V. module.
                         *
                         * This FireGento e.V. module is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2014 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         */
                        /**
                         * Shipment model rewrite.
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         */
                        class FireGento_Pdf_Model_Shipment extends Mage_Sales_Model_Order_Pdf_Shipment
                        {

                            /**
                             * The actual PDF engine responsible for rendering the file.
                             *
                             * @var Mage_Sales_Model_Order_Pdf_Abstract
                             */
                            protected $_engine;

                            /**
                             * get pdf rendering engine
                             *
                             * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Shipment
                             */
                            protected function getEngine()
                            {
                                if (!$this->_engine) {
                                    $modelClass = Mage::getStoreConfig('sales_pdf/shipment/engine');
                                    $engine = Mage::getModel($modelClass);

                                    if (!$engine || $engine instanceof FireGento_Pdf_Model_Shipment) {
                                        // Fallback to Magento standard shipment layout.
                                        // use new here to circumvent our own rewrite
                                        $engine = new Mage_Sales_Model_Order_Pdf_Shipment();
                                    }

                                    $this->_engine = $engine;
                                }

                                return $this->_engine;
                            }

                            /**
                             * get PDF object
                             *
                             * @param  array|Varien_Data_Collection $shipments shipments to generate pdfs for
                             *
                             * @return mixed
                             */
                            public function getPdf($shipments = array())
                            {
                                return $this->getEngine()->getPdf($shipments);
                            }

                        }

                        Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                        diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xhtml index e14e6f6..c66632e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Font.php

                        Source of file Font.php

                        - Size: 1,407 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                        /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php

                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
                        <?php
                        /**
                         * This file is part of a FireGento e.V. module.
                         *
                         * This FireGento e.V. module is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         */

                        /**
                         * Class FireGento_Pdf_Model_System_Config_Backend_Font
                         *
                         * @category FireGento
                         * @package  FireGento_Pdf
                         * @author   FireGento Team <team@firegento.com>
                         */
                        class FireGento_Pdf_Model_System_Config_Backend_Font
                            extends Mage_Adminhtml_Model_System_Config_Backend_File
                        {
                            private $_allowedExtensions
                                = array(
                                    'otf',
                                    'ttf',
                                );

                            /**
                             * Returns the allowed font extensions.
                             *
                             * @return array containing the allowed font extensions
                             */
                            protected function _getAllowedExtensions()
                            {
                                return $this->_allowedExtensions;
                            }
                        }

                        + Size: 1,408 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                        /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php

                        1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
                        <?php
                        /**
                         * This file is part of a FireGento e.V. module.
                         *
                         * This FireGento e.V. module is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License version 3 as
                         * published by the Free Software Foundation.
                         *
                         * This script is distributed in the hope that it will be useful, but WITHOUT
                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                         *
                         * PHP version 5
                         *
                         * @category  FireGento
                         * @package   FireGento_Pdf
                         * @author    FireGento Team <team@firegento.com>
                         * @copyright 2014 FireGento Team (http://www.firegento.com)
                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                         */
                        /**
                         * Class FireGento_Pdf_Model_System_Config_Backend_Font
                         *
                         * @category FireGento
                         * @package  FireGento_Pdf
                         * @author   FireGento Team <team@firegento.com>
                         */
                        class FireGento_Pdf_Model_System_Config_Backend_Font
                            extends Mage_Adminhtml_Model_System_Config_Backend_File
                        {
                            protected $_allowedExtensions
                                = array(
                                    'otf',
                                    'ttf',
                                );

                            /**
                             * Returns the allowed font extensions.
                             *
                             * @return array containing the allowed font extensions
                             */
                            protected function _getAllowedExtensions()
                            {
                                return $this->_allowedExtensions;
                            }
                        }

                        Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                        diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/index.xhtml index 566371e..d161991 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Backend/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -64,8 +64,8 @@

                        Source of FireGento_Pdf

                        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                        • @@ -109,7 +109,7 @@ 1.4 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xhtml index ea8cfbf..bf2c729 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Engine.php

                          Source of file Engine.php

                          - Size: 2,581 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                          /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php

                          123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
                          <?php
                          /**
                           * This file is part of the FIREGENTO project.
                           *
                           * FireGento_Pdf is free software; you can redistribute it and/or
                           * modify it under the terms of the GNU General Public License version 3 as
                           * published by the Free Software Foundation.
                           *
                           * This script is distributed in the hope that it will be useful, but WITHOUT
                           * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                           * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                           *
                           * PHP version 5
                           *
                           * @category  FireGento
                           * @package   FireGento_Pdf
                           * @author    FireGento Team <team@firegento.com>
                           * @copyright 2013 FireGento Team (http://www.firegento.com)
                           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                           * @version   $Id:$
                           * @since     0.1.0
                           */
                          /**
                           * Pdf creation engine source model.
                           *
                           * @category  FireGento
                           * @package   FireGento_Pdf
                           * @author    FireGento Team <team@firegento.com>
                           * @copyright 2013 FireGento Team (http://www.firegento.com)
                           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                           * @version   $Id:$
                           * @since     0.1.0
                           */
                          class FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine
                          {
                              /**
                               * Config xpath to pdf engine node
                               *
                               */
                              const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_creditmemo_engines';

                              /**
                               * Return array of possible engines.
                               *
                               * @return array
                               */
                              public function toOptionArray()
                              {
                                  // load default engines shipped with Mage_Sales and FireGento_Pdf
                                  $engines = array(
                                      ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                      'firegento_pdf/engine_creditmemo_default' => Mage::helper('firegento_pdf')->__('Standard Germany')
                                  );

                                  // load additional engines provided by third party extensions
                                  $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                  if ($engineNodes && $engineNodes->hasChildren()) {
                                      foreach ($engineNodes->children() as $engineName => $engineNode) {
                                          $className   = (string) $engineNode->class;
                                          $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                          $engines[$className] = $engineLabel;
                                      }
                                  }

                                  $options = array();
                                  foreach ($engines as $k => $v) {
                                      $options[] = array(
                                          'value' => $k,
                                          'label' => $v
                                      );
                                  }
                                  return $options;
                              }
                          }

                          + Size: 2,359 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                          /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php

                          12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
                          <?php
                          /**
                           * This file is part of a FireGento e.V. module.
                           *
                           * This FireGento e.V. module is free software; you can redistribute it and/or
                           * modify it under the terms of the GNU General Public License version 3 as
                           * published by the Free Software Foundation.
                           *
                           * This script is distributed in the hope that it will be useful, but WITHOUT
                           * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                           * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                           *
                           * PHP version 5
                           *
                           * @category  FireGento
                           * @package   FireGento_Pdf
                           * @author    FireGento Team <team@firegento.com>
                           * @copyright 2014 FireGento Team (http://www.firegento.com)
                           * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                           */
                          /**
                           * Pdf creation engine source model.
                           *
                           * @category  FireGento
                           * @package   FireGento_Pdf
                           * @author    FireGento Team <team@firegento.com>
                           */
                          class FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine
                          {
                              /**
                               * Config xpath to pdf engine node
                               *
                               */
                              const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_creditmemo_engines';

                              /**
                               * Return array of possible engines.
                               *
                               * @return array
                               */
                              public function toOptionArray()
                              {
                                  // load default engines shipped with Mage_Sales and FireGento_Pdf
                                  $engines = array(
                                      ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                      'firegento_pdf/engine_creditmemo_default' => Mage::helper('firegento_pdf')->__('Standard FireGento')
                                  );

                                  // load additional engines provided by third party extensions
                                  $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                  if ($engineNodes && $engineNodes->hasChildren()) {
                                      foreach ($engineNodes->children() as $engineName => $engineNode) {
                                          $className   = (string) $engineNode->class;
                                          $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                          $engines[$className] = $engineLabel;
                                      }
                                  }

                                  $options = array();
                                  foreach ($engines as $k => $v) {
                                      $options[] = array(
                                          'value' => $k,
                                          'label' => $v
                                      );
                                  }

                                  return $options;
                              }
                          }

                          Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                          diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/index.xhtml index f0f7d71..e620e2f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -67,8 +67,8 @@

                          Source of FireGento_Pdf

                          - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                          • @@ -113,9 +113,9 @@ Engine.php - 2.5 KB + 2.3 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xhtml new file mode 100644 index 0000000..06c830a --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of Number.php

                            Source of file Number.php

                            + Size: 1,907 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php

                            1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
                            <?php
                            /**
                             * This file is part of the FIREGENTO project.
                             *
                             * FireGento_Pdf is free software; you can redistribute it and/or
                             * modify it under the terms of the GNU General Public License version 3 as
                             * published by the Free Software Foundation.
                             *
                             * This script is distributed in the hope that it will be useful, but WITHOUT
                             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                             *
                             * PHP version 5
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2015 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             */
                            /**
                             * Customer number source model.
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2015 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             */
                            class FireGento_Pdf_Model_System_Config_Source_Customer_Number
                            {
                                /**
                                 * Databasefield name for customers increment_id
                                 */
                                const CUSTOMER_NUMBER_FIELD_INCREMENT_ID = 'increment_id';
                                /**
                                 * Return array of possible positions.
                                 *
                                 * @return array
                                 */
                                public function toOptionArray()
                                {
                                    $selectOptions = array(
                                        '' => Mage::helper('firegento_pdf')->__('Standard (entity_id)'),
                                        self::CUSTOMER_NUMBER_FIELD_INCREMENT_ID => Mage::helper('firegento_pdf')
                                            ->__('Customer Increment ID (increment_id)')
                                    );
                                    $options = array();
                                    foreach ($selectOptions as $k => $v) {
                                        $options[] = array(
                                            'value' => $k,
                                            'label' => $v
                                        );
                                    }

                                    return $options;
                                }
                            }

                            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/index.xhtml new file mode 100644 index 0000000..b3db8b0 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/index.xhtml @@ -0,0 +1,132 @@ + + + + + phpDox - Overview + + + + + +
                            +
                            + +
                            +

                            Source of FireGento_Pdf

                            +

                            + This project consists of 43 directories, containing + a total of 45 files. +

                            + + + + + + + + + + + + + + + +
                            NameSizeLast Modified
                            + Number.php + 1.9 KB + 2018-03-12T19:59:19+00:00
                            + + Total: 1 files +
                            +
                            +
                            + +
                            + + diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xhtml index e950b34..0b3c10d 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Headerblocks.php

                            Source of file Headerblocks.php

                            - Size: 1,821 Bytes - Last Modified: 2014-11-01T14:33:47+01:00

                            /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php

                            123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
                            <?php
                            /**
                             * This file is part of the FIREGENTO project.
                             *
                             * FireGento_Pdf is free software; you can redistribute it and/or
                             * modify it under the terms of the GNU General Public License version 3 as
                             * published by the Free Software Foundation.
                             *
                             * This script is distributed in the hope that it will be useful, but WITHOUT
                             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                             *
                             * PHP version 5
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2013 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             * @version   $Id:$
                             * @since     0.1.0
                             */
                            /**
                             * Logo position source model.
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2013 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             * @version   $Id:$
                             * @since     0.1.0
                             */
                            class FireGento_Pdf_Model_System_Config_Source_Headerblocks
                            {
                                const LEFT = 'left';
                                const RIGHT = 'right';

                                /**
                                 * Return array of possible positions.
                                 *
                                 * @return array
                                 */
                                public function toOptionArray()
                                {
                                    $positions = array(
                                        self::LEFT       => Mage::helper('firegento_pdf')->__('Left'),
                                        self::RIGHT      => Mage::helper('firegento_pdf')->__('Right'),
                                    );
                                    $options = array();
                                    foreach ($positions as $k => $v) {
                                        $options[] = array(
                                            'value' => $k,
                                            'label' => $v
                                        );
                                    }
                                    return $options;
                                }
                            }

                            + Size: 1,597 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php

                            12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
                            <?php
                            /**
                             * This file is part of a FireGento e.V. module.
                             *
                             * This FireGento e.V. module is free software; you can redistribute it and/or
                             * modify it under the terms of the GNU General Public License version 3 as
                             * published by the Free Software Foundation.
                             *
                             * This script is distributed in the hope that it will be useful, but WITHOUT
                             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                             *
                             * PHP version 5
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2014 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             */
                            /**
                             * Logo position source model.
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             */
                            class FireGento_Pdf_Model_System_Config_Source_Headerblocks
                            {
                                const LEFT = 'left';
                                const RIGHT = 'right';

                                /**
                                 * Return array of possible positions.
                                 *
                                 * @return array
                                 */
                                public function toOptionArray()
                                {
                                    $positions = array(
                                        self::LEFT       => Mage::helper('firegento_pdf')->__('Left'),
                                        self::RIGHT      => Mage::helper('firegento_pdf')->__('Right'),
                                    );
                                    $options = array();
                                    foreach ($positions as $k => $v) {
                                        $options[] = array(
                                            'value' => $k,
                                            'label' => $v
                                        );
                                    }

                                    return $options;
                                }
                            }

                            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xhtml index 27c8883..410fd97 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Engine.php

                            Source of file Engine.php

                            - Size: 2,572 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                            /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php

                            123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
                            <?php
                            /**
                             * This file is part of the FIREGENTO project.
                             *
                             * FireGento_Pdf is free software; you can redistribute it and/or
                             * modify it under the terms of the GNU General Public License version 3 as
                             * published by the Free Software Foundation.
                             *
                             * This script is distributed in the hope that it will be useful, but WITHOUT
                             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                             *
                             * PHP version 5
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2013 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             * @version   $Id:$
                             * @since     0.1.0
                             */
                            /**
                             * Pdf creation engine source model.
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2013 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             * @version   $Id:$
                             * @since     0.1.0
                             */
                            class FireGento_Pdf_Model_System_Config_Source_Invoice_Engine
                            {
                                /**
                                 * Config xpath to pdf engine node
                                 *
                                 */
                                const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_invoice_engines';

                                /**
                                 * Return array of possible engines.
                                 *
                                 * @return array
                                 */
                                public function toOptionArray()
                                {
                                    // load default engines shipped with Mage_Sales and FireGento_Pdf
                                    $engines = array(
                                        ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                        'firegento_pdf/engine_invoice_default' => Mage::helper('firegento_pdf')->__('Standard Germany')
                                    );

                                    // load additional engines provided by third party extensions
                                    $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                    if ($engineNodes && $engineNodes->hasChildren()) {
                                        foreach ($engineNodes->children() as $engineName => $engineNode) {
                                            $className   = (string) $engineNode->class;
                                            $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                            $engines[$className] = $engineLabel;
                                        }
                                    }

                                    $options = array();
                                    foreach ($engines as $k => $v) {
                                        $options[] = array(
                                            'value' => $k,
                                            'label' => $v
                                        );
                                    }
                                    return $options;
                                }
                            }

                            + Size: 2,350 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                            /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php

                            12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
                            <?php
                            /**
                             * This file is part of a FireGento e.V. module.
                             *
                             * This FireGento e.V. module is free software; you can redistribute it and/or
                             * modify it under the terms of the GNU General Public License version 3 as
                             * published by the Free Software Foundation.
                             *
                             * This script is distributed in the hope that it will be useful, but WITHOUT
                             * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                             * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                             *
                             * PHP version 5
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             * @copyright 2014 FireGento Team (http://www.firegento.com)
                             * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                             */
                            /**
                             * Pdf creation engine source model.
                             *
                             * @category  FireGento
                             * @package   FireGento_Pdf
                             * @author    FireGento Team <team@firegento.com>
                             */
                            class FireGento_Pdf_Model_System_Config_Source_Invoice_Engine
                            {
                                /**
                                 * Config xpath to pdf engine node
                                 *
                                 */
                                const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_invoice_engines';

                                /**
                                 * Return array of possible engines.
                                 *
                                 * @return array
                                 */
                                public function toOptionArray()
                                {
                                    // load default engines shipped with Mage_Sales and FireGento_Pdf
                                    $engines = array(
                                        ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                        'firegento_pdf/engine_invoice_default' => Mage::helper('firegento_pdf')->__('Standard FireGento')
                                    );

                                    // load additional engines provided by third party extensions
                                    $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                    if ($engineNodes && $engineNodes->hasChildren()) {
                                        foreach ($engineNodes->children() as $engineName => $engineNode) {
                                            $className   = (string) $engineNode->class;
                                            $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                            $engines[$className] = $engineLabel;
                                        }
                                    }

                                    $options = array();
                                    foreach ($engines as $k => $v) {
                                        $options[] = array(
                                            'value' => $k,
                                            'label' => $v
                                        );
                                    }

                                    return $options;
                                }
                            }

                            Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                            diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/index.xhtml index 3b11375..6dc07de 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -67,8 +67,8 @@

                            Source of FireGento_Pdf

                            - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                            • @@ -113,9 +113,9 @@ Engine.php - 2.5 KB + 2.3 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xhtml index 211d756..7c0b8a4 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Logo.php

                              Source of file Logo.php

                              - Size: 2,036 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php

                              12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
                              <?php
                              /**
                               * This file is part of the FIREGENTO project.
                               *
                               * FireGento_Pdf is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              /**
                               * Logo position source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Logo
                              {
                                  const LEFT = 'left';
                                  const CENTER = 'center';
                                  const RIGHT = 'right';
                                  const FULL_WIDTH = 'full_width';

                                  /**
                                   * Return array of possible positions.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      $positions = array(
                                          self::LEFT       => Mage::helper('firegento_pdf')->__('Left'),
                                          self::CENTER     => Mage::helper('firegento_pdf')->__('Center'),
                                          self::RIGHT      => Mage::helper('firegento_pdf')->__('Right'),
                                          self::FULL_WIDTH => Mage::helper('firegento_pdf')->__('Full width')
                                      );
                                      $options = array();
                                      foreach ($positions as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }
                                      return $options;
                                  }
                              }

                              + Size: 1,812 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php

                              1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
                              <?php
                              /**
                               * This file is part of a FireGento e.V. module.
                               *
                               * This FireGento e.V. module is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               */
                              /**
                               * Logo position source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Logo
                              {
                                  const LEFT = 'left';
                                  const CENTER = 'center';
                                  const RIGHT = 'right';
                                  const FULL_WIDTH = 'full_width';

                                  /**
                                   * Return array of possible positions.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      $positions = array(
                                          self::LEFT       => Mage::helper('firegento_pdf')->__('Left'),
                                          self::CENTER     => Mage::helper('firegento_pdf')->__('Center'),
                                          self::RIGHT      => Mage::helper('firegento_pdf')->__('Right'),
                                          self::FULL_WIDTH => Mage::helper('firegento_pdf')->__('Full width')
                                      );
                                      $options = array();
                                      foreach ($positions as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }

                                      return $options;
                                  }
                              }

                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xhtml new file mode 100644 index 0000000..7cbfdcf --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of PageSize.php

                              Source of file PageSize.php

                              + Size: 1,556 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php

                              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
                              <?php
                              /**
                               * This file is part of a FireGento e.V. module.
                               *
                               * This FireGento e.V. module is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2015 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               */

                              /**
                               * Page size source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               */
                              class FireGento_Pdf_Model_System_Config_Source_PageSize
                              {
                                  /**
                                   * Return array of possible sizes.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      $positions = array(
                                          Zend_Pdf_Page::SIZE_A4     => Mage::helper('firegento_pdf')->__('DIN A4'),
                                          Zend_Pdf_Page::SIZE_LETTER => Mage::helper('firegento_pdf')->__('Letter')
                                      );

                                      $options = array();
                                      foreach ($positions as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }

                                      return $options;
                                  }
                              }

                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xhtml index 59851c2..e6c86c5 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Payment.php

                              Source of file Payment.php

                              - Size: 1,936 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php

                              12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
                              <?php
                              /**
                               * This file is part of the FIREGENTO project.
                               *
                               * FireGento_Pdf is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              /**
                               * Payment method position source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Payment
                              {
                                  const POSITION_HEADER = 'header';
                                  const POSITION_NOTE = 'note';

                                  /**
                                   * Return array of possible positions.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      $positions = array(
                                          '' => Mage::helper('firegento_pdf')->__('Hide payment method'),
                                          self::POSITION_HEADER => Mage::helper('firegento_pdf')->__('Header'),
                                          self::POSITION_NOTE => Mage::helper('firegento_pdf')->__('Notes area')
                                      );
                                      $options = array();
                                      foreach ($positions as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }
                                      return $options;
                                  }
                              }

                              + Size: 1,712 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php

                              1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
                              <?php
                              /**
                               * This file is part of a FireGento e.V. module.
                               *
                               * This FireGento e.V. module is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               */
                              /**
                               * Payment method position source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Payment
                              {
                                  const POSITION_HEADER = 'header';
                                  const POSITION_NOTE = 'note';

                                  /**
                                   * Return array of possible positions.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      $positions = array(
                                          '' => Mage::helper('firegento_pdf')->__('Hide payment method'),
                                          self::POSITION_HEADER => Mage::helper('firegento_pdf')->__('Header'),
                                          self::POSITION_NOTE => Mage::helper('firegento_pdf')->__('Notes area')
                                      );
                                      $options = array();
                                      foreach ($positions as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }

                                      return $options;
                                  }
                              }

                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xhtml index 209a398..544aa4f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Engine.php

                              Source of file Engine.php

                              - Size: 2,575 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php

                              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
                              <?php
                              /**
                               * This file is part of the FIREGENTO project.
                               *
                               * FireGento_Pdf is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              /**
                               * Pdf creation engine source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2013 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               * @version   $Id:$
                               * @since     0.1.0
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Shipment_Engine
                              {
                                  /**
                                   * Config xpath to pdf engine node
                                   *
                                   */
                                  const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_shipment_engines';

                                  /**
                                   * Return array of possible engines.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      // load default engines shipped with Mage_Sales and FireGento_Pdf
                                      $engines = array(
                                          ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                          'firegento_pdf/engine_shipment_default' => Mage::helper('firegento_pdf')->__('Standard Germany')
                                      );

                                      // load additional engines provided by third party extensions
                                      $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                      if ($engineNodes && $engineNodes->hasChildren()) {
                                          foreach ($engineNodes->children() as $engineName => $engineNode) {
                                              $className   = (string) $engineNode->class;
                                              $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                              $engines[$className] = $engineLabel;
                                          }
                                      }

                                      $options = array();
                                      foreach ($engines as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }
                                      return $options;
                                  }
                              }

                              + Size: 2,353 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php

                              12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
                              <?php
                              /**
                               * This file is part of a FireGento e.V. module.
                               *
                               * This FireGento e.V. module is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License version 3 as
                               * published by the Free Software Foundation.
                               *
                               * This script is distributed in the hope that it will be useful, but WITHOUT
                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                               *
                               * PHP version 5
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                               */
                              /**
                               * Pdf creation engine source model.
                               *
                               * @category  FireGento
                               * @package   FireGento_Pdf
                               * @author    FireGento Team <team@firegento.com>
                               */
                              class FireGento_Pdf_Model_System_Config_Source_Shipment_Engine
                              {
                                  /**
                                   * Config xpath to pdf engine node
                                   *
                                   */
                                  const XML_PATH_PDF_ENGINE = 'global/pdf/firegento_shipment_engines';

                                  /**
                                   * Return array of possible engines.
                                   *
                                   * @return array
                                   */
                                  public function toOptionArray()
                                  {
                                      // load default engines shipped with Mage_Sales and FireGento_Pdf
                                      $engines = array(
                                          ''                                     => Mage::helper('firegento_pdf')->__('Standard Magento'),
                                          'firegento_pdf/engine_shipment_default' => Mage::helper('firegento_pdf')->__('Standard FireGento')
                                      );

                                      // load additional engines provided by third party extensions
                                      $engineNodes = Mage::app()->getConfig()->getNode(self::XML_PATH_PDF_ENGINE);
                                      if ($engineNodes && $engineNodes->hasChildren()) {
                                          foreach ($engineNodes->children() as $engineName => $engineNode) {
                                              $className   = (string) $engineNode->class;
                                              $engineLabel = Mage::helper('firegento_pdf')->__((string) $engineNode->label);
                                              $engines[$className] = $engineLabel;
                                          }
                                      }

                                      $options = array();
                                      foreach ($engines as $k => $v) {
                                          $options[] = array(
                                              'value' => $k,
                                              'label' => $v
                                          );
                                      }

                                      return $options;
                                  }
                              }

                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/index.xhtml index 9f9765f..ad6785e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -67,8 +67,8 @@

                              Source of FireGento_Pdf

                              - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                              • @@ -113,9 +113,9 @@ Engine.php - 2.5 KB + 2.3 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xhtml index 5cd1294..703207a 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Shipping.php

                                Source of file Shipping.php

                                - Size: 1,939 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                                /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php

                                12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
                                <?php
                                /**
                                 * This file is part of the FIREGENTO project.
                                 *
                                 * FireGento_Pdf is free software; you can redistribute it and/or
                                 * modify it under the terms of the GNU General Public License version 3 as
                                 * published by the Free Software Foundation.
                                 *
                                 * This script is distributed in the hope that it will be useful, but WITHOUT
                                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                 *
                                 * PHP version 5
                                 *
                                 * @category  FireGento
                                 * @package   FireGento_Pdf
                                 * @author    FireGento Team <team@firegento.com>
                                 * @copyright 2013 FireGento Team (http://www.firegento.com)
                                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                 * @version   $Id:$
                                 * @since     0.1.0
                                 */
                                /**
                                 * Shipping method position source model.
                                 *
                                 * @category  FireGento
                                 * @package   FireGento_Pdf
                                 * @author    FireGento Team <team@firegento.com>
                                 * @copyright 2013 FireGento Team (http://www.firegento.com)
                                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                 * @version   $Id:$
                                 * @since     0.1.0
                                 */
                                class FireGento_Pdf_Model_System_Config_Source_Shipping
                                {
                                    const POSITION_HEADER = 'header';
                                    const POSITION_NOTE = 'note';

                                    /**
                                     * Return array of possible positions.
                                     *
                                     * @return array
                                     */
                                    public function toOptionArray()
                                    {
                                        $positions = array(
                                            '' => Mage::helper('firegento_pdf')->__('Hide shipping method'),
                                            self::POSITION_HEADER => Mage::helper('firegento_pdf')->__('Header'),
                                            self::POSITION_NOTE => Mage::helper('firegento_pdf')->__('Notes area')
                                        );
                                        $options = array();
                                        foreach ($positions as $k => $v) {
                                            $options[] = array(
                                                'value' => $k,
                                                'label' => $v
                                            );
                                        }
                                        return $options;
                                    }
                                }

                                + Size: 1,715 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php

                                1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
                                <?php
                                /**
                                 * This file is part of a FireGento e.V. module.
                                 *
                                 * This FireGento e.V. module is free software; you can redistribute it and/or
                                 * modify it under the terms of the GNU General Public License version 3 as
                                 * published by the Free Software Foundation.
                                 *
                                 * This script is distributed in the hope that it will be useful, but WITHOUT
                                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                 *
                                 * PHP version 5
                                 *
                                 * @category  FireGento
                                 * @package   FireGento_Pdf
                                 * @author    FireGento Team <team@firegento.com>
                                 * @copyright 2014 FireGento Team (http://www.firegento.com)
                                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                 */
                                /**
                                 * Shipping method position source model.
                                 *
                                 * @category  FireGento
                                 * @package   FireGento_Pdf
                                 * @author    FireGento Team <team@firegento.com>
                                 */
                                class FireGento_Pdf_Model_System_Config_Source_Shipping
                                {
                                    const POSITION_HEADER = 'header';
                                    const POSITION_NOTE = 'note';

                                    /**
                                     * Return array of possible positions.
                                     *
                                     * @return array
                                     */
                                    public function toOptionArray()
                                    {
                                        $positions = array(
                                            '' => Mage::helper('firegento_pdf')->__('Hide shipping method'),
                                            self::POSITION_HEADER => Mage::helper('firegento_pdf')->__('Header'),
                                            self::POSITION_NOTE => Mage::helper('firegento_pdf')->__('Notes area')
                                        );
                                        $options = array();
                                        foreach ($positions as $k => $v) {
                                            $options[] = array(
                                                'value' => $k,
                                                'label' => $v
                                            );
                                        }

                                        return $options;
                                    }
                                }

                                Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/index.xhtml index 5910703..275dab6 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/Source/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -64,8 +64,8 @@

                                Source of FireGento_Pdf

                                - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                • @@ -112,13 +112,22 @@     + + + + Customer + + +   +   + Headerblocks.php - 1.8 KB + 1.6 KB - 2014-11-01T14:33:47+01:00 + 2018-03-12T19:59:19+00:00 @@ -133,17 +142,25 @@ Logo.php - 2.0 KB + 1.8 KB + + 2018-03-12T19:59:19+00:00 + + + + PageSize.php + + 1.5 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 Payment.php - 1.9 KB + 1.7 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 @@ -158,14 +175,14 @@ Shipping.php - 1.9 KB + 1.7 KB - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 - Total: 3 directories,4 files + Total: 4 directories,5 files diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/index.xhtml index 9e82f0b..a79ecc8 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/Config/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

                                  Source of FireGento_Pdf

                                  - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                  • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/index.xhtml index 7742fbb..f4bdb1e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/System/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                    Source of FireGento_Pdf

                                    - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                    • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xhtml index b76563f..5df1770 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of Grandtotal.php

                                      Source of file Grandtotal.php

                                      - Size: 3,996 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                                      /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php

                                      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
                                      <?php
                                      /**
                                       * This file is part of the FIREGENTO project.
                                       *
                                       * FireGento_Pdf is free software; you can redistribute it and/or
                                       * modify it under the terms of the GNU General Public License version 3 as
                                       * published by the Free Software Foundation.
                                       *
                                       * This script is distributed in the hope that it will be useful, but WITHOUT
                                       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                       *
                                       * PHP version 5
                                       *
                                       * @category  FireGento
                                       * @package   FireGento_Pdf
                                       * @author    FireGento Team <team@firegento.com>
                                       * @copyright 2013 FireGento Team (http://www.firegento.com)
                                       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                       */
                                      /**
                                       * Shipment bundle item model.
                                       *
                                       * @category  FireGento
                                       * @package   FireGento_Pdf
                                       * @author    FireGento Team <team@firegento.com>
                                       * @copyright 2013 FireGento Team (http://www.firegento.com)
                                       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                       * @version   $Id:$
                                       * @since     0.1.0
                                       */
                                      class FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal extends Mage_Tax_Model_Sales_Pdf_Grandtotal
                                      {

                                          const NO_SUM_ON_DETAILS = 'tax/sales_display/no_sum_on_details';
                                          const HIDE_GRANDTOTAL_EXCL_TAX = 'tax/sales_display/hide_grandtotal_excl_tax';

                                          /**
                                           * Check if tax amount should be included to grandtotals block
                                           * array(
                                           *  $index => array(
                                           *      'amount'   => $amount,
                                           *      'label'    => $label,
                                           *      'font_size'=> $font_size
                                           *  )
                                           * )
                                           *
                                           * @return array
                                           */
                                          public function getTotalsForDisplay()
                                          {
                                              $store = $this->getOrder()->getStore();
                                              $config = Mage::getSingleton('tax/config');
                                              $noDisplaySumOnDetails = Mage::getStoreConfig(self::NO_SUM_ON_DETAILS, $store);
                                              $hideGrandTotalExclTax = Mage::getStoreConfig(self::HIDE_GRANDTOTAL_EXCL_TAX, $store);
                                              if (!$config->displaySalesTaxWithGrandTotal($store)) {
                                                  return parent::getTotalsForDisplay();
                                              }
                                              $amount = $this->getOrder()->formatPriceTxt($this->getAmount());
                                              $amountExclTax = $this->getAmount() - $this->getSource()->getTaxAmount();
                                              $amountExclTax = ($amountExclTax > 0) ? $amountExclTax : 0;
                                              $amountExclTax = $this->getOrder()->formatPriceTxt($amountExclTax);
                                              $tax = $this->getOrder()->formatPriceTxt($this->getSource()->getTaxAmount());
                                              $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;

                                              $totals = array();
                                              if (!$hideGrandTotalExclTax) {
                                                  $totals[] = array(
                                                      'amount' => $this->getAmountPrefix() . $amountExclTax,
                                                      'label' => Mage::helper('tax')->__('Grand Total (Excl. Tax)') . ':',
                                                      'font_size' => $fontSize
                                                  );
                                              }

                                              /**
                                               * if display_sales_full_summary = 1
                                               * display each tax group
                                               * if no_sum_on_details is = 1 display tax total additionally
                                               * else display only tax total
                                               */
                                              if ($config->displaySalesFullSummary($store)) {
                                                  $totals = array_merge($totals, $this->getFullTaxInfo());
                                                  if (!$noDisplaySumOnDetails) {
                                                      $totals[] = array(
                                                          'amount' => $this->getAmountPrefix() . $tax,
                                                          'label' => Mage::helper('tax')->__('Tax') . ':',
                                                          'font_size' => $fontSize
                                                      );
                                                  }
                                              } else {
                                                  $totals[] = array(
                                                      'amount' => $this->getAmountPrefix() . $tax,
                                                      'label' => Mage::helper('tax')->__('Tax') . ':',
                                                      'font_size' => $fontSize
                                                  );
                                              }

                                              $totals[] = array(
                                                  'amount' => $this->getAmountPrefix() . $amount,
                                                  'label' => Mage::helper('tax')->__('Grand Total (Incl. Tax)') . ':',
                                                  'font_size' => $fontSize
                                              );
                                              return $totals;
                                          }
                                      }

                                      + Size: 3,812 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                      /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php

                                      123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
                                      <?php
                                      /**
                                       * This file is part of a FireGento e.V. module.
                                       *
                                       * This FireGento e.V. module is free software; you can redistribute it and/or
                                       * modify it under the terms of the GNU General Public License version 3 as
                                       * published by the Free Software Foundation.
                                       *
                                       * This script is distributed in the hope that it will be useful, but WITHOUT
                                       * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                       * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                       *
                                       * PHP version 5
                                       *
                                       * @category  FireGento
                                       * @package   FireGento_Pdf
                                       * @author    FireGento Team <team@firegento.com>
                                       * @copyright 2014 FireGento Team (http://www.firegento.com)
                                       * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                       */
                                      /**
                                       * Shipment bundle item model.
                                       *
                                       * @category  FireGento
                                       * @package   FireGento_Pdf
                                       * @author    FireGento Team <team@firegento.com>
                                       */
                                      class FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal extends Mage_Tax_Model_Sales_Pdf_Grandtotal
                                      {

                                          const NO_SUM_ON_DETAILS = 'tax/sales_display/no_sum_on_details';
                                          const HIDE_GRANDTOTAL_EXCL_TAX = 'tax/sales_display/hide_grandtotal_excl_tax';

                                          /**
                                           * Check if tax amount should be included to grandtotals block
                                           * array(
                                           *  $index => array(
                                           *      'amount'   => $amount,
                                           *      'label'    => $label,
                                           *      'font_size'=> $font_size
                                           *  )
                                           * )
                                           *
                                           * @return array
                                           */
                                          public function getTotalsForDisplay()
                                          {
                                              $store = $this->getOrder()->getStore();
                                              $config = Mage::getSingleton('tax/config');
                                              $noDisplaySumOnDetails = Mage::getStoreConfig(self::NO_SUM_ON_DETAILS, $store);
                                              $hideGrandTotalExclTax = Mage::getStoreConfig(self::HIDE_GRANDTOTAL_EXCL_TAX, $store);
                                              if (!$config->displaySalesTaxWithGrandTotal($store)) {
                                                  return parent::getTotalsForDisplay();
                                              }

                                              $amount = $this->getOrder()->formatPriceTxt($this->getAmount());
                                              $amountExclTax = $this->getAmount() - $this->getSource()->getTaxAmount();
                                              $amountExclTax = ($amountExclTax > 0) ? $amountExclTax : 0;
                                              $amountExclTax = $this->getOrder()->formatPriceTxt($amountExclTax);
                                              $tax = $this->getOrder()->formatPriceTxt($this->getSource()->getTaxAmount());
                                              $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;

                                              $totals = array();
                                              if (!$hideGrandTotalExclTax) {
                                                  $totals[] = array(
                                                      'amount' => $this->getAmountPrefix() . $amountExclTax,
                                                      'label' => Mage::helper('tax')->__('Grand Total (Excl. Tax)') . ':',
                                                      'font_size' => $fontSize
                                                  );
                                              }

                                              /**
                                               * if display_sales_full_summary = 1
                                               * display each tax group
                                               * if no_sum_on_details is = 1 display tax total additionally
                                               * else display only tax total
                                               */
                                              if ($config->displaySalesFullSummary($store)) {
                                                  $totals = array_merge($totals, $this->getFullTaxInfo());
                                                  if (!$noDisplaySumOnDetails) {
                                                      $totals[] = array(
                                                          'amount' => $this->getAmountPrefix() . $tax,
                                                          'label' => Mage::helper('tax')->__('Tax') . ':',
                                                          'font_size' => $fontSize
                                                      );
                                                  }
                                              } else {
                                                  $totals[] = array(
                                                      'amount' => $this->getAmountPrefix() . $tax,
                                                      'label' => Mage::helper('tax')->__('Tax') . ':',
                                                      'font_size' => $fontSize
                                                  );
                                              }

                                              $totals[] = array(
                                                  'amount' => $this->getAmountPrefix() . $amount,
                                                  'label' => Mage::helper('tax')->__('Grand Total (Incl. Tax)') . ':',
                                                  'font_size' => $fontSize
                                              );
                                              return $totals;
                                          }
                                      }

                                      Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                      diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/index.xhtml index 4ddf00b..3184739 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -64,8 +64,8 @@

                                      Source of FireGento_Pdf

                                      - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                      • @@ -107,9 +107,9 @@ Grandtotal.php - 3.9 KB + 3.7 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/index.xhtml index 1ec1635..f8c6138 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/Sales/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

                                        Source of FireGento_Pdf

                                        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                        • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/index.xhtml index 42eeb05..4a9c633 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/Tax/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                          Source of FireGento_Pdf

                                          - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                          • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/index.xhtml index a9597b5..ddd554f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Model/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Model/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

                                            Source of FireGento_Pdf

                                            - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                            • @@ -89,9 +89,9 @@ Creditmemo.php - 2.2 KB + 2.1 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 @@ -106,9 +106,9 @@ Invoice.php - 2.3 KB + 2.2 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 @@ -123,17 +123,17 @@ Observer.php - 7.4 KB + 11.5 KB - 2014-11-08T19:25:48+01:00 + 2018-03-12T19:59:19+00:00 Shipment.php - 2.2 KB + 2.1 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xhtml index 3e7d140..e67c818 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of CreditmemoTest.php

                                              Source of file CreditmemoTest.php

                                              - Size: 0,516 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php

                                              12345678910111213141516171819202122
                                              <?php


                                              class FireGento_Pdf_Test_Model_CreditmemoTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $class = 'FireGento_Pdf_Model_Creditmemo';
                                                  
                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/creditmemo/engine';
                                                  }
                                                  
                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Creditmemo';
                                                  }

                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Creditmemo';
                                                  }
                                              } 
                                              + Size: 1,446 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php

                                              1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
                                              <?php
                                              /**
                                               * This file is part of a FireGento e.V. module.
                                               *
                                               * This FireGento e.V. module is free software; you can redistribute it and/or
                                               * modify it under the terms of the GNU General Public License version 3 as
                                               * published by the Free Software Foundation.
                                               *
                                               * This script is distributed in the hope that it will be useful, but WITHOUT
                                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                               *
                                               * PHP version 5
                                               *
                                               * @category  FireGento
                                               * @package   FireGento_Pdf
                                               * @author    FireGento Team <team@firegento.com>
                                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                               */
                                              /**
                                               * Test class for creditmemos.
                                               *
                                               * @category FireGento
                                               * @package  FireGento_Pdf
                                               * @author   FireGento Team <team@firegento.com>
                                               */
                                              class FireGento_Pdf_Test_Model_CreditmemoTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $_class = 'FireGento_Pdf_Model_Creditmemo';
                                                  
                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/creditmemo/engine';
                                                  }
                                                  
                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Creditmemo';
                                                  }

                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Creditmemo';
                                                  }
                                              }

                                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xhtml index 48fe7d5..09965de 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of InvoiceTest.php

                                              Source of file InvoiceTest.php

                                              - Size: 0,501 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php

                                              12345678910111213141516171819202122
                                              <?php


                                              class FireGento_Pdf_Test_Model_InvoiceTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $class = 'FireGento_Pdf_Model_Invoice';
                                                  
                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/invoice/engine';
                                                  }
                                                  
                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Invoice';
                                                  }

                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Invoice';
                                                  }
                                              } 
                                              + Size: 1,428 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php

                                              1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
                                              <?php
                                              /**
                                               * This file is part of a FireGento e.V. module.
                                               *
                                               * This FireGento e.V. module is free software; you can redistribute it and/or
                                               * modify it under the terms of the GNU General Public License version 3 as
                                               * published by the Free Software Foundation.
                                               *
                                               * This script is distributed in the hope that it will be useful, but WITHOUT
                                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                               *
                                               * PHP version 5
                                               *
                                               * @category  FireGento
                                               * @package   FireGento_Pdf
                                               * @author    FireGento Team <team@firegento.com>
                                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                               */
                                              /**
                                               * Test class for invoices.
                                               *
                                               * @category FireGento
                                               * @package  FireGento_Pdf
                                               * @author   FireGento Team <team@firegento.com>
                                               */
                                              class FireGento_Pdf_Test_Model_InvoiceTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $_class = 'FireGento_Pdf_Model_Invoice';
                                                  
                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/invoice/engine';
                                                  }
                                                  
                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Invoice';
                                                  }

                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Invoice';
                                                  }
                                              }

                                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xhtml index c6365b4..3218c29 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of SalesObjectTestAbstract.php

                                              Source of file SalesObjectTestAbstract.php

                                              - Size: 3,304 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php

                                              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
                                              <?php


                                              abstract class FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                                  extends EcomDev_PHPUnit_Test_Case
                                              {
                                                  protected $class = '';

                                                  /**
                                                   * @test
                                                   */
                                                  public function itShouldExist()
                                                  {
                                                      $this->assertTrue(class_exists($this->class));
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldExist
                                                   */
                                                  public function itShouldHaveAMethodGetEngine()
                                                  {
                                                      try {
                                                          new ReflectionMethod($this->class, 'getEngine');
                                                      } catch (ReflectionException $e) {
                                                          $this->fail($e->getMessage());
                                                      }
                                                  }
                                                  
                                                  abstract function getEngineXmlConfigPath();
                                                  
                                                  abstract function getExpectedDefaultEngineClass();

                                                  abstract public function getOrderObjectClassName();

                                                  /**
                                                   * @test
                                                   * @depends itShouldHaveAMethodGetEngine
                                                   */
                                                  public function itShouldReturnADefaultEngineModel()
                                                  {
                                                      $this->app()->getStore()->setConfig($this->getEngineXmlConfigPath(), 'invalid');
                                                      $instance = new $this->class;
                                                      $result = $this->callMethod($instance, 'getEngine');
                                                      $this->assertInstanceOf($this->getExpectedDefaultEngineClass(), $result);
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldExist
                                                   */
                                                  public function itShouldhaveAMethodGetPdf()
                                                  {
                                                      $instance = new $this->class;
                                                      $this->assertTrue(is_callable(array($instance, 'getPdf')));
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldhaveAMethodGetPdf
                                                   */
                                                  public function itShouldReturnAZendPdf()
                                                  {
                                                      $instance = new $this->class;
                                                      
                                                      $mockAddress = $this->getMock('Mage_Sales_Model_Order_Address');

                                                      $mockPaymentMethod = $this->getMockForAbstractClass('Mage_Payment_Model_Method_Abstract');
                                                      
                                                      $mockPaymentInfo = $this->getMock('Mage_Sales_Model_Order_Payment');
                                                      $mockPaymentInfo->expects($this->any())
                                                          ->method('getMethodInstance')
                                                          ->will($this->returnValue($mockPaymentMethod));

                                                      $mockOrder = $this->getMock('Mage_Sales_Model_Order');
                                                      $mockOrder->expects($this->any())
                                                          ->method('getBillingAddress')
                                                          ->will($this->returnValue($mockAddress));
                                                      $mockOrder->expects($this->any())
                                                          ->method('getShippingAddress')
                                                          ->will($this->returnValue($mockAddress));
                                                      
                                                      $mockOrder->expects($this->any())
                                                          ->method('getPayment')
                                                          ->will($this->returnValue($mockPaymentInfo));
                                                      
                                                      $mockObj = $this->getMockBuilder($this->getOrderObjectClassName())
                                                          ->disableOriginalConstructor()
                                                          ->getMock();
                                                      $mockObj->expects($this->any())
                                                          ->method('getOrder')
                                                          ->will($this->returnValue($mockOrder));
                                                      $mockObj->expects($this->any())
                                                          ->method('getAllItems')
                                                          ->will($this->returnValue(array()));
                                                      
                                                      $result = $instance->getPdf(array($mockObj));
                                                      $this->assertInstanceOf('Zend_Pdf', $result);
                                                  }


                                                  protected function callMethod($object, $method, array $args = null)
                                                  {
                                                      $method = new ReflectionMethod($object, $method);
                                                      $method->setAccessible(true);
                                                      if (isset($args)) {
                                                          return $method->invokeArgs($object, $args);
                                                      } else {
                                                          return $method->invoke($object);
                                                      }
                                                  }
                                              } 
                                              + Size: 4,524 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php

                                              123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
                                              <?php
                                              /**
                                               * This file is part of a FireGento e.V. module.
                                               *
                                               * This FireGento e.V. module is free software; you can redistribute it and/or
                                               * modify it under the terms of the GNU General Public License version 3 as
                                               * published by the Free Software Foundation.
                                               *
                                               * This script is distributed in the hope that it will be useful, but WITHOUT
                                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                               *
                                               * PHP version 5
                                               *
                                               * @category  FireGento
                                               * @package   FireGento_Pdf
                                               * @author    FireGento Team <team@firegento.com>
                                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                               */
                                              /**
                                               * Abstract test class for the different engines.
                                               *
                                               * @category FireGento
                                               * @package  FireGento_Pdf
                                               * @author   FireGento Team <team@firegento.com>
                                               */
                                              abstract class FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                                  extends EcomDev_PHPUnit_Test_Case
                                              {
                                                  protected $_class = '';

                                                  /**
                                                   * @test
                                                   */
                                                  public function itShouldExist()
                                                  {
                                                      $this->assertTrue(class_exists($this->_class));
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldExist
                                                   */
                                                  public function itShouldHaveAMethodGetEngine()
                                                  {
                                                      try {
                                                          new ReflectionMethod($this->_class, 'getEngine');
                                                      } catch (ReflectionException $e) {
                                                          $this->fail($e->getMessage());
                                                      }
                                                  }
                                                  
                                                  abstract public function getEngineXmlConfigPath();
                                                  
                                                  abstract public function getExpectedDefaultEngineClass();

                                                  abstract public function getOrderObjectClassName();

                                                  /**
                                                   * @test
                                                   * @depends itShouldHaveAMethodGetEngine
                                                   */
                                                  public function itShouldReturnADefaultEngineModel()
                                                  {
                                                      static::app()->getStore()->setConfig($this->getEngineXmlConfigPath(), 'invalid');
                                                      $instance = new $this->_class;
                                                      $result = $this->callMethod($instance, 'getEngine');
                                                      $this->assertInstanceOf($this->getExpectedDefaultEngineClass(), $result);
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldExist
                                                   */
                                                  public function itShouldhaveAMethodGetPdf()
                                                  {
                                                      $instance = new $this->_class;
                                                      $this->assertTrue(is_callable(array($instance, 'getPdf')));
                                                  }

                                                  /**
                                                   * @test
                                                   * @depends itShouldhaveAMethodGetPdf
                                                   */
                                                  public function itShouldReturnAZendPdf()
                                                  {
                                                      $instance = new $this->_class;

                                                      $mockAddress = $this->getMock('Mage_Sales_Model_Order_Address');

                                                      $mockPaymentMethod = $this->getMock('Mage_Payment_Model_Method_Abstract');
                                                      $mockPaymentMethod->expects($this->any())
                                                          ->method('getInfoBlockType')
                                                          ->will($this->returnValue('payment/info'));

                                                      $mockPaymentInfo = $this->getMock('Mage_Sales_Model_Order_Payment');
                                                      $mockPaymentInfo->expects($this->any())
                                                          ->method('getMethodInstance')
                                                          ->will($this->returnValue($mockPaymentMethod));

                                                      $mockOrder = $this->getMock('Mage_Sales_Model_Order');
                                                      $mockOrder->expects($this->any())
                                                          ->method('getBillingAddress')
                                                          ->will($this->returnValue($mockAddress));
                                                      $mockOrder->expects($this->any())
                                                          ->method('getShippingAddress')
                                                          ->will($this->returnValue($mockAddress));

                                                      $mockOrder->expects($this->any())
                                                          ->method('getPayment')
                                                          ->will($this->returnValue($mockPaymentInfo));
                                                      
                                                      $mockObj = $this->getMockBuilder($this->getOrderObjectClassName())
                                                          ->disableOriginalConstructor()
                                                          ->getMock();
                                                      $mockObj->expects($this->any())
                                                          ->method('getOrder')
                                                          ->will($this->returnValue($mockOrder));
                                                      $mockObj->expects($this->any())
                                                          ->method('getAllItems')
                                                          ->will($this->returnValue(array()));

                                                      $currentArea = Mage::getDesign()->getArea();
                                                      Mage::getDesign()->setArea('adminhtml');
                                                      $result = $instance->getPdf(array($mockObj));
                                                      Mage::getDesign()->setArea($currentArea);
                                                      $this->assertInstanceOf('Zend_Pdf', $result);
                                                  }


                                                  protected function callMethod($object, $method, array $args = null)
                                                  {
                                                      $method = new ReflectionMethod($object, $method);
                                                      $method->setAccessible(true);
                                                      if (isset($args)) {
                                                          return $method->invokeArgs($object, $args);
                                                      } else {
                                                          return $method->invoke($object);
                                                      }
                                                  }
                                              }

                                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xhtml index c43cce3..b1c2379 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of ShipmentTest.php

                                              Source of file ShipmentTest.php

                                              - Size: 0,502 Bytes - Last Modified: 2014-10-26T15:00:57+01:00

                                              /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php

                                              12345678910111213141516171819202122
                                              <?php


                                              class FireGento_Pdf_Test_Model_ShipmentTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $class = 'FireGento_Pdf_Model_Shipment';

                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/invoice/shipment';
                                                  }

                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Shipment';
                                                  }
                                                  
                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Shipment';
                                                  }
                                              }
                                              + Size: 1,430 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                              /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php

                                              1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
                                              <?php
                                              /**
                                               * This file is part of a FireGento e.V. module.
                                               *
                                               * This FireGento e.V. module is free software; you can redistribute it and/or
                                               * modify it under the terms of the GNU General Public License version 3 as
                                               * published by the Free Software Foundation.
                                               *
                                               * This script is distributed in the hope that it will be useful, but WITHOUT
                                               * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                               * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                               *
                                               * PHP version 5
                                               *
                                               * @category  FireGento
                                               * @package   FireGento_Pdf
                                               * @author    FireGento Team <team@firegento.com>
                                               * @copyright 2014 FireGento Team (http://www.firegento.com)
                                               * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                               */
                                              /**
                                               * Test class for shipments.
                                               *
                                               * @category FireGento
                                               * @package  FireGento_Pdf
                                               * @author   FireGento Team <team@firegento.com>
                                               */
                                              class FireGento_Pdf_Test_Model_ShipmentTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract
                                              {
                                                  protected $_class = 'FireGento_Pdf_Model_Shipment';

                                                  public function getEngineXmlConfigPath()
                                                  {
                                                      return 'sales_pdf/shipment/engine';
                                                  }

                                                  public function getExpectedDefaultEngineClass()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Pdf_Shipment';
                                                  }
                                                  
                                                  public function getOrderObjectClassName()
                                                  {
                                                      return 'Mage_Sales_Model_Order_Shipment';
                                                  }
                                              }

                                              Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                              diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/index.xhtml index 68e7ab9..03edefe 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/Model/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                              Source of FireGento_Pdf

                                              - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                              • @@ -95,33 +95,33 @@ CreditmemoTest.php - 516 Bytes + 1.4 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 InvoiceTest.php - 501 Bytes + 1.4 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 SalesObjectTestAbstract.php - 3.2 KB + 4.4 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 ShipmentTest.php - 502 Bytes + 1.4 KB - 2014-10-26T15:00:57+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/index.xhtml index 3cad8a6..a9c63e0 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/Test/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/Test/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

                                                Source of FireGento_Pdf

                                                - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xhtml new file mode 100644 index 0000000..816d222 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of CreditmemoController.php

                                                  Source of file CreditmemoController.php

                                                  + Size: 1,799 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                  /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php

                                                  12345678910111213141516171819202122232425262728293031323334353637383940414243444546
                                                  <?php

                                                  require('Mage/Adminhtml/controllers/Sales/CreditmemoController.php');

                                                  class FireGento_Pdf_Adminhtml_Sales_CreditmemoController
                                                      extends Mage_Adminhtml_Sales_CreditmemoController
                                                  {
                                                      public function pdfcreditmemosAction()
                                                      {
                                                          $creditmemosIds = $this->getRequest()->getPost('creditmemo_ids');
                                                          if (count($creditmemosIds) > 1) {
                                                              $invoices = Mage::getResourceModel('sales/order_creditmemo_collection')
                                                                  ->addAttributeToSelect('*')
                                                                  ->addAttributeToFilter('entity_id', array('in' => $creditmemosIds))
                                                                  ->load();
                                                              if (!isset($pdf)) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
                                                              } else {
                                                                  $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
                                                                  $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                              }

                                                              return $this->_prepareDownloadResponse(
                                                                  Mage::helper('firegento_pdf')
                                                                      ->getExportFilenameForMultipleDocuments('creditmemo'),
                                                                  $pdf->render(), 'application/pdf'
                                                              );
                                                          } else if (count($creditmemosIds) == 1) {
                                                              $creditmemoId = $creditmemosIds[0];
                                                              if ($invoice = Mage::getModel('sales/order_creditmemo')
                                                                  ->load($creditmemoId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_creditmemo')
                                                                      ->getPdf(array($invoice));
                                                                  return $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('creditmemo', $invoice),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          }

                                                          $this->_redirect('*/*/');
                                                      }
                                                  }

                                                  Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                  diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xhtml new file mode 100644 index 0000000..308101d --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of InvoiceController.php

                                                  Source of file InvoiceController.php

                                                  + Size: 1,742 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                  /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php

                                                  12345678910111213141516171819202122232425262728293031323334353637383940414243444546
                                                  <?php

                                                  require('Mage/Adminhtml/controllers/Sales/InvoiceController.php');

                                                  class FireGento_Pdf_Adminhtml_Sales_InvoiceController
                                                      extends Mage_Adminhtml_Sales_InvoiceController
                                                  {
                                                      public function pdfinvoicesAction()
                                                      {
                                                          $invoicesIds = $this->getRequest()->getPost('invoice_ids');
                                                          if (count($invoicesIds) > 1) {
                                                              $invoices = Mage::getResourceModel('sales/order_invoice_collection')
                                                                  ->addAttributeToSelect('*')
                                                                  ->addAttributeToFilter('entity_id', array('in' => $invoicesIds))
                                                                  ->load();
                                                              if (!isset($pdf)) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                                                              } else {
                                                                  $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                                                                  $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                              }

                                                              return $this->_prepareDownloadResponse(
                                                                  Mage::helper('firegento_pdf')
                                                                      ->getExportFilenameForMultipleDocuments('invoice'),
                                                                  $pdf->render(), 'application/pdf'
                                                              );
                                                          } else if (count($invoicesIds) == 1) {
                                                              $invoiceId = $invoicesIds[0];
                                                              if ($invoice = Mage::getModel('sales/order_invoice')
                                                                  ->load($invoiceId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_invoice')
                                                                      ->getPdf(array($invoice));
                                                                  return $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('invoice', $invoice),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          }

                                                          $this->_redirect('*/*/');
                                                      }
                                                  }

                                                  Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                  diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xhtml index 6c5e8a9..3742f00 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of CreditmemoController.php

                                                  Source of file CreditmemoController.php

                                                  - Size: 2,026 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                                                  /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php

                                                  1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */
                                                  require('Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController
                                                      extends Mage_Adminhtml_Sales_Order_CreditmemoController
                                                  {

                                                      /**
                                                       * Create pdf for current creditmemo
                                                       */
                                                      public function printAction()
                                                      {
                                                          $this->_initCreditmemo();
                                                          /** @see Mage_Adminhtml_Sales_Order_InvoiceController */
                                                          if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
                                                              if ($creditmemo = Mage::getModel('sales/order_creditmemo')
                                                                  ->load($creditmemoId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_creditmemo')
                                                                      ->getPdf(array($creditmemo));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('creditmemo', $creditmemo),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  + Size: 2,027 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                  /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php

                                                  123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2014 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */

                                                  require('Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController
                                                      extends Mage_Adminhtml_Sales_Order_CreditmemoController
                                                  {

                                                      /**
                                                       * Create pdf for current creditmemo
                                                       */
                                                      public function printAction()
                                                      {
                                                          $this->_initCreditmemo();
                                                          /** @see Mage_Adminhtml_Sales_Order_InvoiceController */
                                                          if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
                                                              if ($creditmemo = Mage::getModel('sales/order_creditmemo')
                                                                  ->load($creditmemoId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_creditmemo')
                                                                      ->getPdf(array($creditmemo));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('creditmemo', $creditmemo),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                  diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xhtml index c9c776e..202fb6f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of InvoiceController.php

                                                  Source of file InvoiceController.php

                                                  - Size: 1,917 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                                                  /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php

                                                  1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */

                                                  require('Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController
                                                      extends Mage_Adminhtml_Sales_Order_InvoiceController
                                                  {

                                                      /**
                                                       * Create pdf for current invoice
                                                       */
                                                      public function printAction()
                                                      {
                                                          $this->_initInvoice();
                                                          if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
                                                              if ($invoice = Mage::getModel('sales/order_invoice')
                                                                  ->load($invoiceId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_invoice')
                                                                      ->getPdf(array($invoice));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('invoice', $invoice),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  + Size: 1,917 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                  /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php

                                                  1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2014 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */

                                                  require('Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController
                                                      extends Mage_Adminhtml_Sales_Order_InvoiceController
                                                  {

                                                      /**
                                                       * Create pdf for current invoice
                                                       */
                                                      public function printAction()
                                                      {
                                                          $this->_initInvoice();
                                                          if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
                                                              if ($invoice = Mage::getModel('sales/order_invoice')
                                                                  ->load($invoiceId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_invoice')
                                                                      ->getPdf(array($invoice));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('invoice', $invoice),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                  diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xhtml index 4479819..bd90811 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of ShipmentController.php

                                                  Source of file ShipmentController.php

                                                  - Size: 1,991 Bytes - Last Modified: 2014-11-08T20:00:37+01:00

                                                  /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php

                                                  123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */

                                                  require('Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController
                                                      extends Mage_Adminhtml_Sales_Order_ShipmentController
                                                  {

                                                      /**
                                                       * Create pdf for current shipment
                                                       */
                                                      public function printAction()
                                                      {
                                                          /** @see Mage_Adminhtml_Sales_Order_InvoiceController */
                                                          if ($shipmentId = $this->getRequest()->getParam('invoice_id')
                                                          ) { // invoice_id o_0
                                                              if ($shipment = Mage::getModel('sales/order_shipment')
                                                                  ->load($shipmentId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_shipment')
                                                                      ->getPdf(array($shipment));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('shipment', $shipment),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  + Size: 1,991 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                  /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php

                                                  123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
                                                  <?php
                                                  /**
                                                   * This file is part of a FireGento e.V. module.
                                                   *
                                                   * This FireGento e.V. module is free software; you can redistribute it and/or
                                                   * modify it under the terms of the GNU General Public License version 3 as
                                                   * published by the Free Software Foundation.
                                                   *
                                                   * This script is distributed in the hope that it will be useful, but WITHOUT
                                                   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                   *
                                                   * PHP version 5
                                                   *
                                                   * @category  FireGento
                                                   * @package   FireGento_Pdf
                                                   * @author    FireGento Team <team@firegento.com>
                                                   * @copyright 2014 FireGento Team (http://www.firegento.com)
                                                   * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                   */

                                                  require('Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php');

                                                  /**
                                                   * Class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController
                                                   *
                                                   * @category FireGento
                                                   * @package  FireGento_Pdf
                                                   * @author   FireGento Team <team@firegento.com>
                                                   */
                                                  class FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController
                                                      extends Mage_Adminhtml_Sales_Order_ShipmentController
                                                  {

                                                      /**
                                                       * Create pdf for current shipment
                                                       */
                                                      public function printAction()
                                                      {
                                                          /** @see Mage_Adminhtml_Sales_Order_InvoiceController */
                                                          if ($shipmentId = $this->getRequest()->getParam('invoice_id')
                                                          ) { // invoice_id o_0
                                                              if ($shipment = Mage::getModel('sales/order_shipment')
                                                                  ->load($shipmentId)
                                                              ) {
                                                                  $pdf = Mage::getModel('sales/order_pdf_shipment')
                                                                      ->getPdf(array($shipment));
                                                                  $this->_prepareDownloadResponse(
                                                                      Mage::helper('firegento_pdf')
                                                                          ->getExportFilename('shipment', $shipment),
                                                                      $pdf->render(), 'application/pdf'
                                                                  );
                                                              }
                                                          } else {
                                                              $this->_forward('noRoute');
                                                          }
                                                      }

                                                  }

                                                  Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                  diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/index.xhtml index 8c8b4ba..09fb38e 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -64,8 +64,8 @@

                                                  Source of FireGento_Pdf

                                                  - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                  • @@ -109,7 +109,7 @@ 2.0 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 @@ -117,7 +117,7 @@ 1.9 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 @@ -125,7 +125,7 @@ 1.9 KB - 2014-11-08T20:00:37+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xhtml new file mode 100644 index 0000000..758378f --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of OrderController.php

                                                    Source of file OrderController.php

                                                    + Size: 6,227 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php

                                                    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
                                                    <?php

                                                    require('Mage/Adminhtml/controllers/Sales/OrderController.php');

                                                    class FireGento_Pdf_Adminhtml_Sales_OrderController
                                                        extends Mage_Adminhtml_Sales_OrderController
                                                    {
                                                        public function pdfinvoicesAction()
                                                        {
                                                            $orderIds = $this->getRequest()->getPost('order_ids');
                                                            $flag = false;
                                                            if (!empty($orderIds)) {
                                                                $invoice = null;
                                                                foreach ($orderIds as $orderId) {
                                                                    $invoices = Mage::getResourceModel('sales/order_invoice_collection')
                                                                        ->setOrderFilter($orderId)
                                                                        ->load();
                                                                    if ($invoices->getSize() == 1) {
                                                                        $invoice = $invoices->getFirstItem();
                                                                    }

                                                                    if ($invoices->getSize() > 0) {
                                                                        $flag = true;
                                                                        if (!isset($pdf)) {
                                                                            $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                                                                        } else {
                                                                            $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
                                                                            $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                                            // there is more than one invoice
                                                                            $invoice = null;
                                                                        }
                                                                    }
                                                                }

                                                                if ($flag) {
                                                                    if ($invoice != null) {
                                                                        return $this->_prepareDownloadResponse(
                                                                            Mage::helper('firegento_pdf')
                                                                                ->getExportFilename('invoice', $invoice),
                                                                            $pdf->render(), 'application/pdf'
                                                                        );
                                                                    }

                                                                    return $this->_prepareDownloadResponse(
                                                                        Mage::helper('firegento_pdf')
                                                                            ->getExportFilenameForMultipleDocuments('invoice'),
                                                                        $pdf->render(), 'application/pdf'
                                                                    );
                                                                } else {
                                                                    $this->_getSession()->addError(
                                                                        $this->__('There are no printable documents related to selected orders.')
                                                                    );
                                                                    $this->_redirect('*/*/');
                                                                }
                                                            }

                                                            $this->_redirect('*/*/');
                                                        }

                                                        public function pdfshipmentsAction()
                                                        {
                                                            $orderIds = $this->getRequest()->getPost('order_ids');
                                                            $flag = false;
                                                            if (!empty($orderIds)) {
                                                                $shipment = null;
                                                                foreach ($orderIds as $orderId) {
                                                                    $shipments = Mage::getResourceModel('sales/order_shipment_collection')
                                                                        ->setOrderFilter($orderId)
                                                                        ->load();
                                                                    if ($shipments->getSize() == 1) {
                                                                        $shipment = $shipments->getFirstItem();
                                                                    }

                                                                    if ($shipments->getSize() > 0) {
                                                                        $flag = true;
                                                                        if (!isset($pdf)) {
                                                                            $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
                                                                        } else {
                                                                            $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
                                                                            $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                                            // there is more than one invoice
                                                                            $shipment = null;
                                                                        }
                                                                    }
                                                                }

                                                                if ($flag) {
                                                                    if ($shipment != null) {
                                                                        return $this->_prepareDownloadResponse(
                                                                            Mage::helper('firegento_pdf')
                                                                                ->getExportFilename('shipment', $shipment),
                                                                            $pdf->render(), 'application/pdf'
                                                                        );
                                                                    }

                                                                    return $this->_prepareDownloadResponse(
                                                                        Mage::helper('firegento_pdf')
                                                                            ->getExportFilenameForMultipleDocuments('shipment'),
                                                                        $pdf->render(), 'application/pdf'
                                                                    );
                                                                } else {
                                                                    $this->_getSession()->addError(
                                                                        $this->__('There are no printable documents related to selected orders.')
                                                                    );
                                                                    $this->_redirect('*/*/');
                                                                }
                                                            }

                                                            $this->_redirect('*/*/');
                                                        }

                                                        public function pdfcreditmemosAction()
                                                        {
                                                            $orderIds = $this->getRequest()->getPost('order_ids');
                                                            $flag = false;
                                                            if (!empty($orderIds)) {
                                                                $creditmemo = null;
                                                                foreach ($orderIds as $orderId) {
                                                                    $creditmemos = Mage::getResourceModel('sales/order_creditmemo_collection')
                                                                        ->setOrderFilter($orderId)
                                                                        ->load();
                                                                    if ($creditmemos->getSize() == 1) {
                                                                        $creditmemo = $creditmemos->getFirstItem();
                                                                    }

                                                                    if ($creditmemos->getSize() > 0) {
                                                                        $flag = true;
                                                                        if (!isset($pdf)) {
                                                                            $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
                                                                        } else {
                                                                            $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos);
                                                                            $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                                            // there is more than one invoice
                                                                            $creditmemo = null;
                                                                        }
                                                                    }
                                                                }

                                                                if ($flag) {
                                                                    if ($creditmemo != null) {
                                                                        return $this->_prepareDownloadResponse(
                                                                            Mage::helper('firegento_pdf')
                                                                                ->getExportFilename('creditmemo', $creditmemo),
                                                                            $pdf->render(), 'application/pdf'
                                                                        );
                                                                    }

                                                                    return $this->_prepareDownloadResponse(
                                                                        Mage::helper('firegento_pdf')
                                                                            ->getExportFilenameForMultipleDocuments('creditmemo'),
                                                                        $pdf->render(), 'application/pdf'
                                                                    );
                                                                } else {
                                                                    $this->_getSession()->addError(
                                                                        $this->__('There are no printable documents related to selected orders.')
                                                                    );
                                                                    $this->_redirect('*/*/');
                                                                }
                                                            }

                                                            $this->_redirect('*/*/');
                                                        }
                                                    }

                                                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xhtml new file mode 100644 index 0000000..9ad48d8 --- /dev/null +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xhtml @@ -0,0 +1,3 @@ + +phpDox - Source of ShipmentController.php

                                                    Source of file ShipmentController.php

                                                    + Size: 1,762 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                    /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php

                                                    12345678910111213141516171819202122232425262728293031323334353637383940414243444546
                                                    <?php

                                                    require('Mage/Adminhtml/controllers/Sales/ShipmentController.php');

                                                    class FireGento_Pdf_Adminhtml_Sales_ShipmentController
                                                        extends Mage_Adminhtml_Sales_ShipmentController
                                                    {
                                                        public function pdfshipmentsAction()
                                                        {
                                                            $shipmentIds = $this->getRequest()->getPost('shipment_ids');
                                                            if (count($shipmentIds) > 1) {
                                                                $shipments = Mage::getResourceModel('sales/order_shipment_collection')
                                                                    ->addAttributeToSelect('*')
                                                                    ->addAttributeToFilter('entity_id', array('in' => $shipmentIds))
                                                                    ->load();
                                                                if (!isset($pdf)) {
                                                                    $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
                                                                } else {
                                                                    $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
                                                                    $pdf->pages = array_merge($pdf->pages, $pages->pages);
                                                                }

                                                                return $this->_prepareDownloadResponse(
                                                                    Mage::helper('firegento_pdf')
                                                                        ->getExportFilenameForMultipleDocuments('shipment'),
                                                                    $pdf->render(), 'application/pdf'
                                                                );
                                                            } else if (count($shipmentIds) == 1) {
                                                                $shipmentId = $shipmentIds[0];
                                                                if ($shipment = Mage::getModel('sales/order_shipment')
                                                                    ->load($shipmentId)
                                                                ) {
                                                                    $pdf = Mage::getModel('sales/order_pdf_shipment')
                                                                        ->getPdf(array($shipment));
                                                                    return $this->_prepareDownloadResponse(
                                                                        Mage::helper('firegento_pdf')
                                                                            ->getExportFilename('shipment', $shipment),
                                                                        $pdf->render(), 'application/pdf'
                                                                    );
                                                                }
                                                            }

                                                            $this->_redirect('*/*/');
                                                        }
                                                    }

                                                    Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                    diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/index.xhtml index f223041..1c23e97 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -61,8 +61,8 @@

                                                    Source of FireGento_Pdf

                                                    - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                    • @@ -97,6 +97,22 @@ Size Last Modified + + + CreditmemoController.php + + 1.8 KB + + 2018-03-12T19:59:19+00:00 + + + + InvoiceController.php + + 1.7 KB + + 2018-03-12T19:59:19+00:00 + @@ -106,10 +122,26 @@     + + + OrderController.php + + 6.1 KB + + 2018-03-12T19:59:19+00:00 + + + + ShipmentController.php + + 1.7 KB + + 2018-03-12T19:59:19+00:00 + - Total: 1 directories, + Total: 1 directories,4 files diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/index.xhtml index 752f8bb..a5a7cdb 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Adminhtml/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                                      Source of FireGento_Pdf

                                                      - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                      • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xhtml index 18dfc7c..a9e806f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of OrderController.php

                                                        Source of file OrderController.php

                                                        - Size: 4,619 Bytes - Last Modified: 2014-11-08T19:25:48+01:00

                                                        /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php

                                                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
                                                        <?php
                                                        /**
                                                         * This file is part of the FIREGENTO project.
                                                         *
                                                         * FireGento_Pdf is free software; you can redistribute it and/or
                                                         * modify it under the terms of the GNU General Public License version 3 as
                                                         * published by the Free Software Foundation.
                                                         *
                                                         * This script is distributed in the hope that it will be useful, but WITHOUT
                                                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                         *
                                                         * PHP version 5
                                                         *
                                                         * @category  FireGento
                                                         * @package   FireGento_Pdf
                                                         * @author    FireGento Team <team@firegento.com>
                                                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                         * @version   $Id:$
                                                         * @since     0.1.0
                                                         */

                                                        require_once 'Mage/Sales/controllers/OrderController.php';

                                                        /**
                                                         * Sales orders controller
                                                         *
                                                         * @category  FireGento
                                                         * @package   FireGento_Pdf
                                                         * @author    FireGento Team <team@firegento.com>
                                                         * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                         * @version   $Id:$
                                                         * @since     0.1.0
                                                         */
                                                        class FireGento_Pdf_Sales_OrderController extends Mage_Sales_OrderController
                                                        {
                                                            protected $_types
                                                                = array(
                                                                    'invoice', 'creditmemo', 'shipment'
                                                                );

                                                            /**
                                                             * Print PDF Invoice Action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */
                                                            public function printInvoiceAction()
                                                            {
                                                                $this->printDocument('invoice');
                                                            }

                                                            /**
                                                             * Print PDF Creditmemo action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */

                                                            public function printCreditmemoAction()
                                                            {
                                                                $this->printDocument('creditmemo');
                                                            }

                                                            /**
                                                             * Print PDF Shipment Action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */
                                                            public function printShipmentAction()
                                                            {
                                                                $this->printDocument('shipment');
                                                            }

                                                            /**
                                                             * Create invoice, creditmemo or shipment pdf
                                                             *
                                                             * @param string $type which document should be created? invoice, creditmemo or shipment
                                                             */
                                                            public function printDocument($type)
                                                            {
                                                                if (!in_array($type, $this->_types)) {
                                                                    Mage::throwException('Type not found in type table.');
                                                                }
                                                                /* @var $order Mage_Sales_Model_Order */
                                                                $documentId = (int)$this->getRequest()->getParam($type . '_id');
                                                                $document = null;
                                                                if ($documentId) {
                                                                    /* @var $document Mage_Sales_Model_Abstract */
                                                                    $document = Mage::getModel('sales/order_' . $type);
                                                                    $document->load($documentId);
                                                                    $order = $document->getOrder();
                                                                } else {
                                                                    $orderId = (int)$this->getRequest()->getParam('order_id');
                                                                    $order = Mage::getModel('sales/order')->load($orderId);
                                                                }

                                                                if ($this->_canViewOrder($order)) {
                                                                    if (isset($orderId)) {
                                                                        // Create a pdf file from all $type s of requested order.
                                                                        /* @var $documentsCollection Mage_Sales_Model_Resource_Order_Collection_Abstract */
                                                                        $documentsCollection = Mage::getResourceModel('sales/order_' . $type . '_collection');
                                                                        $documentsCollection
                                                                            ->addAttributeToSelect('*')
                                                                            ->addAttributeToFilter('order_id', $orderId)
                                                                            ->load();
                                                                    } else {
                                                                        // Create a single $type pdf.
                                                                        $documentsCollection = array($document);
                                                                    }

                                                                    // Store current area and set to adminhtml for $type generation.
                                                                    $currentArea = Mage::getDesign()->getArea();
                                                                    Mage::getDesign()->setArea('adminhtml');

                                                                    /* @var $pdfGenerator Mage_Sales_Model_Order_Pdf_Abstract */
                                                                    $pdfGenerator = Mage::getModel('sales/order_pdf_' . $type);
                                                                    $pdf = $pdfGenerator->getPdf($documentsCollection);
                                                                    $this->_prepareDownloadResponse(
                                                                        Mage::helper('firegento_pdf')->getExportFilename($type, $document), $pdf->render(), 'application/pdf'
                                                                    );

                                                                    // Restore area.
                                                                    Mage::getDesign()->setArea($currentArea);

                                                                } else {
                                                                    if (Mage::getSingleton('customer/session')->isLoggedIn()) {
                                                                        $this->_redirect('*/*/history');
                                                                    } else {
                                                                        $this->_redirect('sales/guest/form');
                                                                    }
                                                                }
                                                            }
                                                        }

                                                        + Size: 4,793 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                        /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php

                                                        123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
                                                        <?php
                                                        /**
                                                         * This file is part of a FireGento e.V. module.
                                                         *
                                                         * This FireGento e.V. module is free software; you can redistribute it and/or
                                                         * modify it under the terms of the GNU General Public License version 3 as
                                                         * published by the Free Software Foundation.
                                                         *
                                                         * This script is distributed in the hope that it will be useful, but WITHOUT
                                                         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                         * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                         *
                                                         * PHP version 5
                                                         *
                                                         * @category  FireGento
                                                         * @package   FireGento_Pdf
                                                         * @author    FireGento Team <team@firegento.com>
                                                         * @copyright 2014 FireGento Team (http://www.firegento.com)
                                                         * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                         */

                                                        require_once 'Mage/Sales/controllers/OrderController.php';

                                                        /**
                                                         * Sales orders controller
                                                         *
                                                         * @category  FireGento
                                                         * @package   FireGento_Pdf
                                                         * @author    FireGento Team <team@firegento.com>
                                                         */
                                                        class FireGento_Pdf_Sales_OrderController extends Mage_Sales_OrderController
                                                        {
                                                            protected $_types
                                                                = array(
                                                                    'invoice', 'creditmemo', 'shipment'
                                                                );

                                                            /**
                                                             * Print PDF Invoice Action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */
                                                            public function printInvoiceAction()
                                                            {
                                                                $this->printDocument('invoice');
                                                            }

                                                            /**
                                                             * Print PDF Creditmemo action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */

                                                            public function printCreditmemoAction()
                                                            {
                                                                $this->printDocument('creditmemo');
                                                            }

                                                            /**
                                                             * Print PDF Shipment Action
                                                             *
                                                             * it changes the standard action with html output to pdf output
                                                             *
                                                             * @return void
                                                             */
                                                            public function printShipmentAction()
                                                            {
                                                                $this->printDocument('shipment');
                                                            }

                                                            /**
                                                             * Create invoice, creditmemo or shipment pdf
                                                             *
                                                             * @param string $type which document should be created? invoice, creditmemo or shipment
                                                             */
                                                            public function printDocument($type)
                                                            {
                                                                if (!in_array($type, $this->_types)) {
                                                                    Mage::throwException('Type not found in type table.');
                                                                }

                                                                /* @var $order Mage_Sales_Model_Order */
                                                                $documentId = (int)$this->getRequest()->getParam($type . '_id');
                                                                $document = null;
                                                                if ($documentId) {
                                                                    /* @var $document Mage_Sales_Model_Abstract */
                                                                    $document = Mage::getModel('sales/order_' . $type);
                                                                    $document->load($documentId);
                                                                    $order = $document->getOrder();
                                                                } else {
                                                                    $orderId = (int)$this->getRequest()->getParam('order_id');
                                                                    $order = Mage::getModel('sales/order')->load($orderId);
                                                                }

                                                                if ($this->_canViewOrder($order)) {
                                                                    if (isset($orderId)) {
                                                                        // Create a pdf file from all $type s of requested order.
                                                                        /* @var $documentsCollection Mage_Sales_Model_Resource_Order_Collection_Abstract */
                                                                        $documentsCollection = Mage::getResourceModel('sales/order_' . $type . '_collection');
                                                                        $documentsCollection
                                                                            ->addAttributeToSelect('*')
                                                                            ->addAttributeToFilter('order_id', $orderId)
                                                                            ->load();
                                                                        if (count($documentsCollection) == 1) {
                                                                            $filename = Mage::helper('firegento_pdf')
                                                                                ->getExportFilename($type, $documentsCollection->getFirstItem());
                                                                        } else {
                                                                            $filename = Mage::helper('firegento_pdf')->getExportFilenameForMultipleDocuments($type);
                                                                        }
                                                                    } else {
                                                                        // Create a single $type pdf.
                                                                        $documentsCollection = array($document);
                                                                        $filename = Mage::helper('firegento_pdf')->getExportFilename($type, $document);
                                                                    }

                                                                    // Store current area and set to adminhtml for $type generation.
                                                                    $currentArea = Mage::getDesign()->getArea();
                                                                    Mage::getDesign()->setArea('adminhtml');

                                                                    /* @var $pdfGenerator Mage_Sales_Model_Order_Pdf_Abstract */
                                                                    $pdfGenerator = Mage::getModel('sales/order_pdf_' . $type);
                                                                    $pdf = $pdfGenerator->getPdf($documentsCollection);
                                                                    $this->_prepareDownloadResponse(
                                                                        $filename, $pdf->render(), 'application/pdf'
                                                                    );

                                                                    // Restore area.
                                                                    Mage::getDesign()->setArea($currentArea);
                                                                } else {
                                                                    if (Mage::getSingleton('customer/session')->isLoggedIn()) {
                                                                        $this->_redirect('*/*/history');
                                                                    } else {
                                                                        $this->_redirect('sales/guest/form');
                                                                    }
                                                                }
                                                            }
                                                        }

                                                        Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                        diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/index.xhtml index ef2874b..187c2ad 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/Sales/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                                        Source of FireGento_Pdf

                                                        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                        • @@ -95,9 +95,9 @@ OrderController.php - 4.5 KB + 4.7 KB - 2014-11-08T19:25:48+01:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/index.xhtml index 85103b5..643335a 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/controllers/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

                                                          Source of FireGento_Pdf

                                                          - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                          • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/index.xhtml index 42ce7a3..773f09f 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -52,8 +52,8 @@

                                                            Source of FireGento_Pdf

                                                            - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                            • diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/index.xhtml index 9e76a30..cb6e68b 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -58,8 +58,8 @@

                                                              Source of FireGento_Pdf

                                                              - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                              • @@ -95,9 +95,9 @@ upgrade-1.0.0-1.1.0.php - 1003 Bytes + 978 Bytes - 2014-10-25T10:53:01+02:00 + 2018-03-12T19:59:19+00:00 diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xhtml index e6bdbb1..9e50fef 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xhtml @@ -1,3 +1,3 @@ phpDox - Source of upgrade-1.0.0-1.1.0.php

                                                                Source of file upgrade-1.0.0-1.1.0.php

                                                                - Size: 1,003 Bytes - Last Modified: 2014-10-25T10:53:01+02:00

                                                                /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php

                                                                12345678910111213141516171819202122232425262728293031
                                                                <?php
                                                                /**
                                                                 * This file is part of the FIREGENTO project.
                                                                 *
                                                                 * FireGento_Pdf is free software; you can redistribute it and/or
                                                                 * modify it under the terms of the GNU General Public License version 3 as
                                                                 * published by the Free Software Foundation.
                                                                 *
                                                                 * This script is distributed in the hope that it will be useful, but WITHOUT
                                                                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                                 *
                                                                 * PHP version 5
                                                                 *
                                                                 * @category  FireGento
                                                                 * @package   FireGento_Pdf
                                                                 * @author    FireGento Team <team@firegento.com>
                                                                 * @copyright 2013 FireGento Team (http://www.firegento.com)
                                                                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                                 * @version   $Id:$
                                                                 * @since     0.1.0
                                                                 */

                                                                /* @var $this Mage_Eav_Model_Entity_Setup */
                                                                $installer = $this;
                                                                $installer->startSetup();

                                                                $installer->deleteConfigData('sales_pdf/firegento_pdf/engine');

                                                                $installer->endSetup();

                                                                + Size: 0,978 Bytes - Last Modified: 2018-03-12T19:59:19+00:00

                                                                /var/www/magento193/.modman/firegento-pdf/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php

                                                                1234567891011121314151617181920212223242526272829
                                                                <?php
                                                                /**
                                                                 * This file is part of a FireGento e.V. module.
                                                                 *
                                                                 * This FireGento e.V. module is free software; you can redistribute it and/or
                                                                 * modify it under the terms of the GNU General Public License version 3 as
                                                                 * published by the Free Software Foundation.
                                                                 *
                                                                 * This script is distributed in the hope that it will be useful, but WITHOUT
                                                                 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
                                                                 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
                                                                 *
                                                                 * PHP version 5
                                                                 *
                                                                 * @category  FireGento
                                                                 * @package   FireGento_Pdf
                                                                 * @author    FireGento Team <team@firegento.com>
                                                                 * @copyright 2014 FireGento Team (http://www.firegento.com)
                                                                 * @license   http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3)
                                                                 */

                                                                /* @var $this Mage_Eav_Model_Entity_Setup */
                                                                $installer = $this;
                                                                $installer->startSetup();

                                                                $installer->deleteConfigData('sales_pdf/firegento_pdf/engine');

                                                                $installer->endSetup();

                                                                Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                                diff --git a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/index.xhtml b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/index.xhtml index e08e7fd..a227141 100644 --- a/docs/api/html/source/app/code/community/FireGento/Pdf/sql/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/Pdf/sql/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -55,8 +55,8 @@

                                                                Source of FireGento_Pdf

                                                                - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                • diff --git a/docs/api/html/source/app/code/community/FireGento/index.xhtml b/docs/api/html/source/app/code/community/FireGento/index.xhtml index caad04f..2178ad5 100644 --- a/docs/api/html/source/app/code/community/FireGento/index.xhtml +++ b/docs/api/html/source/app/code/community/FireGento/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -49,8 +49,8 @@

                                                                  Source of FireGento_Pdf

                                                                  - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                  • diff --git a/docs/api/html/source/app/code/community/index.xhtml b/docs/api/html/source/app/code/community/index.xhtml index 5e8baae..b42757a 100644 --- a/docs/api/html/source/app/code/community/index.xhtml +++ b/docs/api/html/source/app/code/community/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -46,8 +46,8 @@

                                                                    Source of FireGento_Pdf

                                                                    - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                    • diff --git a/docs/api/html/source/app/code/index.xhtml b/docs/api/html/source/app/code/index.xhtml index 494d430..46d8837 100644 --- a/docs/api/html/source/app/code/index.xhtml +++ b/docs/api/html/source/app/code/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -43,8 +43,8 @@

                                                                      Source of FireGento_Pdf

                                                                      - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                      • diff --git a/docs/api/html/source/app/index.xhtml b/docs/api/html/source/app/index.xhtml index e7710c1..e41690c 100644 --- a/docs/api/html/source/app/index.xhtml +++ b/docs/api/html/source/app/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -40,8 +40,8 @@

                                                                        Source of FireGento_Pdf

                                                                        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                        • diff --git a/docs/api/html/source/index.xhtml b/docs/api/html/source/index.xhtml index 7574395..05e3f1b 100644 --- a/docs/api/html/source/index.xhtml +++ b/docs/api/html/source/index.xhtml @@ -1,6 +1,6 @@ - + phpDox - Overview @@ -35,13 +35,13 @@
                                                                        • Source
                                                                        • -
                                                                        • /Users/fabian/Projects/firegento-pdf/.modman/firegento-pdf/src
                                                                        • +
                                                                        • /var/www/magento193/.modman/firegento-pdf/src

                                                                        Source of FireGento_Pdf

                                                                        - This project consists of 35 directories, containing - a total of 34 files. + This project consists of 43 directories, containing + a total of 45 files.

                                                                        • diff --git a/docs/api/html/traits.xhtml b/docs/api/html/traits.xhtml index 5efe8da..325ab32 100644 --- a/docs/api/html/traits.xhtml +++ b/docs/api/html/traits.xhtml @@ -29,7 +29,7 @@

                                                                          Traits

                                                                          - + Generated using phpDox 0.11.0 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
                                                                          diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xml new file mode 100644 index 0000000..f8a8675 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_CreditmemoController.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xml new file mode 100644 index 0000000..149cba7 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_InvoiceController.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xml new file mode 100644 index 0000000..a88369b --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_OrderController.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xml index 97eb4da..e055af3 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController.xml @@ -1,19 +1,19 @@ - - + + - - + + - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xml index 892cc51..931d46a 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_InvoiceController.xml @@ -1,13 +1,13 @@ - + - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xml index 258b0f7..34603d4 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_Order_ShipmentController.xml @@ -1,20 +1,19 @@ - + - + - diff --git a/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xml b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xml new file mode 100644 index 0000000..59e31d3 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Adminhtml_Sales_ShipmentController.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xml b/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xml new file mode 100644 index 0000000..8dfc72f --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xml b/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xml new file mode 100644 index 0000000..5a97c62 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Helper_Data.xml b/docs/api/xml/classes/FireGento_Pdf_Helper_Data.xml index e5019b5..124bafa 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Helper_Data.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Helper_Data.xml @@ -1,29 +1,39 @@ - - + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -33,11 +43,11 @@ - + - + @@ -47,7 +57,7 @@ - + @@ -57,9 +67,40 @@ - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + @@ -70,13 +111,8 @@ - - - - - - + @@ -84,7 +120,15 @@ - + + + + + + + + + @@ -94,7 +138,7 @@ - + @@ -106,10 +150,61 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Helper_Invoice.xml b/docs/api/xml/classes/FireGento_Pdf_Helper_Invoice.xml new file mode 100644 index 0000000..c697db2 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Helper_Invoice.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Creditmemo.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Creditmemo.xml index d987435..3d9ece0 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Creditmemo.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Creditmemo.xml @@ -1,17 +1,14 @@ - - + + - - - - - + + @@ -19,18 +16,15 @@ - + - - - - + @@ -40,6 +34,6 @@ - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Abstract.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Abstract.xml index 9eb67b9..2900225 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Abstract.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Abstract.xml @@ -1,38 +1,73 @@ - - + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + - + - + @@ -45,12 +80,12 @@ - + - + - + @@ -60,13 +95,13 @@ - + - + @@ -76,22 +111,22 @@ - + - + - + - + - + @@ -100,9 +135,9 @@ - + - + @@ -112,10 +147,10 @@ - + - + @@ -123,22 +158,22 @@ - - + + - + - + - - + + - + @@ -152,27 +187,28 @@ - + - + - + - - - - - - + + + + + + + - + - + @@ -182,19 +218,19 @@ - + - + - + - + @@ -205,19 +241,37 @@ - + - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -229,7 +283,7 @@ - + @@ -239,7 +293,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -247,12 +319,13 @@ - + - + + - + @@ -270,17 +343,17 @@ - + - + - + - + @@ -291,21 +364,17 @@ - - - - - + - + - + @@ -313,47 +382,44 @@ - - + + - - - - + + - + - + - - + + - - - + + - + - + - + - + - + @@ -364,21 +430,16 @@ - + - - - - - - + - + - + @@ -386,22 +447,22 @@ - - + + - + - + - + - + @@ -409,7 +470,7 @@ - + @@ -425,7 +486,7 @@ - + @@ -433,7 +494,7 @@ - + @@ -449,7 +510,7 @@ - + @@ -457,7 +518,7 @@ - + @@ -473,7 +534,7 @@ - + @@ -491,14 +552,14 @@ - + - - - + + + - + @@ -506,19 +567,19 @@ - + - + - + @@ -526,13 +587,13 @@ - + - + @@ -540,19 +601,19 @@ - + - + - + @@ -560,13 +621,21 @@ - + - - - + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xml index d857cbc..0c0cf4b 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Creditmemo_Default.xml @@ -1,23 +1,19 @@ - - + + - - - - - + - + @@ -25,17 +21,12 @@ - + - - - - - - + - + @@ -46,10 +37,14 @@ - + + + + + - + @@ -60,28 +55,55 @@ - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + - + - + @@ -94,12 +116,12 @@ - + - + - + @@ -109,13 +131,13 @@ - + - + @@ -125,22 +147,22 @@ - + - + - + - + - + @@ -149,9 +171,9 @@ - + - + @@ -161,10 +183,10 @@ - + - + @@ -172,22 +194,22 @@ - - + + - + - + - - + + - + @@ -201,27 +223,28 @@ - + - + - + - - - - - - + + + + + + + - + - + @@ -231,19 +254,19 @@ - + - + - + - + @@ -254,19 +277,37 @@ - + - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -278,7 +319,7 @@ - + @@ -288,7 +329,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -296,12 +355,13 @@ - + - + + - + @@ -319,17 +379,17 @@ - + - + - + - + @@ -340,21 +400,17 @@ - - - - - + - + - + @@ -362,47 +418,44 @@ - - + + - - - - + + - + - + - - + + - - - + + - + - + - + - + - + @@ -413,21 +466,16 @@ - + - - - - - - + - + - + @@ -435,22 +483,22 @@ - - + + - + - + - + - + @@ -458,7 +506,7 @@ - + @@ -474,7 +522,7 @@ - + @@ -482,7 +530,7 @@ - + @@ -498,7 +546,7 @@ - + @@ -506,7 +554,7 @@ - + @@ -522,7 +570,7 @@ - + @@ -540,12 +588,80 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xml index e31decc..9f44ebd 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Invoice_Default.xml @@ -1,23 +1,19 @@ - - + + - - - - - + - + @@ -25,32 +21,28 @@ - + - - - - - + - + - + - + - - + + - + @@ -61,28 +53,55 @@ - - - - - - - - + + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -95,12 +114,12 @@ - + - + - + @@ -110,13 +129,13 @@ - + - + @@ -126,22 +145,22 @@ - + - + - + - + - + @@ -150,9 +169,9 @@ - + - + @@ -162,10 +181,10 @@ - + - + @@ -173,22 +192,22 @@ - - + + - + - + - - + + - + @@ -202,27 +221,28 @@ - + - + - + - - - - - - + + + + + + + - + - + @@ -232,19 +252,19 @@ - + - + - + - + @@ -255,19 +275,37 @@ - + - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -279,7 +317,7 @@ - + @@ -289,7 +327,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -297,12 +353,13 @@ - + - + + - + @@ -320,17 +377,17 @@ - + - + - + - + @@ -341,21 +398,17 @@ - - - - - + - + - + @@ -363,47 +416,44 @@ - - + + - - - - + + - + - + - - + + - - - + + - + - + - + - + - + @@ -414,21 +464,16 @@ - + - - - - - - + - + - + @@ -436,22 +481,22 @@ - - + + - + - + - + - + @@ -459,7 +504,7 @@ - + @@ -475,7 +520,7 @@ - + @@ -483,7 +528,7 @@ - + @@ -499,7 +544,7 @@ - + @@ -507,7 +552,7 @@ - + @@ -523,7 +568,7 @@ - + @@ -541,12 +586,80 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xml index cf91fc8..0063cd2 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Engine_Shipment_Default.xml @@ -1,23 +1,19 @@ - - + + - - - - - + - + @@ -25,17 +21,15 @@ - + - - - + - + - + @@ -45,10 +39,10 @@ - + - + @@ -57,7 +51,7 @@ - + @@ -70,7 +64,27 @@ - + + + + + + + + + + + + + + + + + + + + + @@ -81,28 +95,55 @@ - - - - - - - - + + - + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -115,12 +156,12 @@ - + - + - + @@ -130,13 +171,13 @@ - + - + @@ -146,22 +187,22 @@ - + - + - + - + - + @@ -170,9 +211,9 @@ - + - + @@ -182,10 +223,10 @@ - + - + @@ -193,22 +234,22 @@ - - + + - + - + - - + + - + @@ -222,27 +263,28 @@ - + - + - + - - - - - - + + + + + + + - + - + @@ -252,19 +294,19 @@ - + - + - + - + @@ -275,19 +317,37 @@ - + - - - - - - + + + + + + + + - + + + + + + + + + + + + + + + + + @@ -299,7 +359,7 @@ - + @@ -309,7 +369,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -317,12 +395,13 @@ - + - + + - + @@ -340,17 +419,17 @@ - + - + - + - + @@ -361,21 +440,17 @@ - - - - - + - + - + @@ -383,47 +458,44 @@ - - + + - - - - + + - + - + - - + + - - - + + - + - + - + - + - + @@ -434,21 +506,16 @@ - + - - - - - - + - + - + @@ -456,22 +523,22 @@ - - + + - + - + - + - + @@ -479,7 +546,7 @@ - + @@ -495,7 +562,7 @@ - + @@ -503,7 +570,7 @@ - + @@ -519,7 +586,7 @@ - + @@ -527,7 +594,7 @@ - + @@ -543,7 +610,7 @@ - + @@ -561,12 +628,80 @@ - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Invoice.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Invoice.xml index 35b12ea..83f85ea 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Invoice.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Invoice.xml @@ -1,18 +1,15 @@ - - + + The invoice model serves as a proxy to the actual PDF engine as set via backend configuration. - - - - - + + @@ -20,18 +17,15 @@ backend configuration. - + - - - - + @@ -39,6 +33,6 @@ backend configuration. - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Bundle.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Bundle.xml index 879dafb..9c4469f 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Bundle.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Bundle.xml @@ -1,18 +1,14 @@ - - + + - - - - - - + + @@ -22,20 +18,7 @@ - - - - - - - - - - - - - - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Default.xml index c7d502c..ac3ec7f 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Default.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Default.xml @@ -1,18 +1,14 @@ - - + + - - - - - - + + @@ -22,20 +18,21 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Downloadable.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Downloadable.xml index fa4300e..b399c7a 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Downloadable.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Downloadable.xml @@ -1,14 +1,14 @@ - - + + - - + + @@ -21,7 +21,6 @@ - @@ -30,11 +29,10 @@ - - - - - + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Grouped.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Grouped.xml index 8416f1d..eca6ffd 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Grouped.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Grouped.xml @@ -1,16 +1,14 @@ - - + + - - - - + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xml index a3009ac..7515827 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Bundle.xml @@ -1,18 +1,14 @@ - - + + - - - - - - + + @@ -20,9 +16,7 @@ - - - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Default.xml index 3b2d47b..893a5ca 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Default.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Shipment_Default.xml @@ -1,18 +1,14 @@ - - + + - - - - - - + + @@ -20,11 +16,12 @@ - - - - - + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xml new file mode 100644 index 0000000..767acfb --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Default.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xml new file mode 100644 index 0000000..e1fa771 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Items_Unirgy_Shipment_Default.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Observer.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Observer.xml index 294cfb2..8548944 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Observer.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Observer.xml @@ -1,17 +1,13 @@ - - + + - - - - - + @@ -22,10 +18,24 @@ - + - + + + + + + + + + + + + + + + @@ -36,10 +46,10 @@ - + - + @@ -50,12 +60,12 @@ - + - + - + @@ -64,10 +74,11 @@ - + + - + @@ -78,10 +89,10 @@ - + - + @@ -92,12 +103,96 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -106,12 +201,11 @@ - + - - - + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Shipment.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Shipment.xml index ef043a6..6495aaf 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Shipment.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Shipment.xml @@ -1,17 +1,14 @@ - - + + - - - - - + + @@ -19,18 +16,15 @@ - + - - - - + @@ -38,6 +32,6 @@ - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xml index 9b8e967..bad3ed7 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Backend_Font.xml @@ -1,15 +1,15 @@ - - + + - - - + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xml index 45bbef2..e8ad01e 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine.xml @@ -1,29 +1,25 @@ - - + + - - - - - + - + - - + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xml new file mode 100644 index 0000000..79516c6 --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Customer_Number.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xml index f6602ce..b92ab25 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Headerblocks.xml @@ -1,19 +1,15 @@ - - + + - - - - - - - + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xml index 21ab098..932b6e7 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Invoice_Engine.xml @@ -1,29 +1,25 @@ - - + + - - - - - + - + - - + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xml index 8afe420..48be848 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Logo.xml @@ -1,21 +1,17 @@ - - + + - - - - - - - - - + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xml new file mode 100644 index 0000000..e852acd --- /dev/null +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_PageSize.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xml index 77a40ed..ca89193 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Payment.xml @@ -1,19 +1,15 @@ - - + + - - - - - - - + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xml index d7433e8..3a9a2a5 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipment_Engine.xml @@ -1,29 +1,25 @@ - - + + - - - - - + - + - - + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xml b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xml index d19f539..0799eb3 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_System_Config_Source_Shipping.xml @@ -1,19 +1,15 @@ - - + + - - - - - - - + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xml b/docs/api/xml/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xml index f025ed1..fa557dc 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal.xml @@ -1,29 +1,25 @@ - - + + - - - - - - - - + + + + - - - - + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Sales_OrderController.xml b/docs/api/xml/classes/FireGento_Pdf_Sales_OrderController.xml index 8d87ac2..2075d49 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Sales_OrderController.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Sales_OrderController.xml @@ -1,19 +1,15 @@ - - + + - - - - - - - + + + it changes the standard action with html output to pdf output @@ -21,7 +17,7 @@ - + it changes the standard action with html output to pdf output @@ -29,7 +25,7 @@ - + it changes the standard action with html output to pdf output @@ -37,16 +33,11 @@ - + - - - - - diff --git a/docs/api/xml/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xml b/docs/api/xml/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xml index b53ed94..d2fbebe 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Test_Model_CreditmemoTest.xml @@ -1,55 +1,61 @@ - - + + + + + + + + - - - - + + + + - - - + + + - + - - - - + + + + - + - + - + - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Test_Model_InvoiceTest.xml b/docs/api/xml/classes/FireGento_Pdf_Test_Model_InvoiceTest.xml index 84cbd63..ab4273d 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Test_Model_InvoiceTest.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Test_Model_InvoiceTest.xml @@ -1,55 +1,61 @@ - - + + + + + + + + - - - - + + + + - - - + + + - + - - - - + + + + - + - + - + - + diff --git a/docs/api/xml/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xml b/docs/api/xml/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xml index dc5b74b..9d7384e 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Test_Model_SalesObjectTestAbstract.xml @@ -1,51 +1,59 @@ - - - - - + + + + + + + + + + + - + - - - - + + + + - + - + - + - + - - - + + + + + diff --git a/docs/api/xml/classes/FireGento_Pdf_Test_Model_ShipmentTest.xml b/docs/api/xml/classes/FireGento_Pdf_Test_Model_ShipmentTest.xml index a69090a..f807994 100644 --- a/docs/api/xml/classes/FireGento_Pdf_Test_Model_ShipmentTest.xml +++ b/docs/api/xml/classes/FireGento_Pdf_Test_Model_ShipmentTest.xml @@ -1,55 +1,61 @@ - - + + + + + + + + - - - - + + + + - - - + + + - + - - - - + + + + - + - + - + - + diff --git a/docs/api/xml/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xml b/docs/api/xml/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xml index 0336335..ba488a3 100644 --- a/docs/api/xml/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xml +++ b/docs/api/xml/classes/Firegento_Pdf_Block_Adminhtml_ColumnOrder.xml @@ -1,17 +1,15 @@ - - + + - + - - - - - + + + @@ -20,10 +18,10 @@ - + - + @@ -32,10 +30,10 @@ - + - + diff --git a/docs/api/xml/index.xml b/docs/api/xml/index.xml index ac63291..3a44b44 100644 --- a/docs/api/xml/index.xml +++ b/docs/api/xml/index.xml @@ -1,28 +1,49 @@ - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/docs/api/xml/source.xml b/docs/api/xml/source.xml index 3b77223..3ae6665 100644 --- a/docs/api/xml/source.xml +++ b/docs/api/xml/source.xml @@ -1,101 +1,128 @@ - + - - - + + + - - + + - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - + + - - - - - + - - - + + + + + + + + - + + + - - - - - + + + + + + + + + + + + + + - - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xml index 41646fa..d66615c 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -65,7 +65,7 @@ /** - * Firegento + * Block which enables the user to change the column order in the admin via drag & drop. * @@ -80,29 +80,23 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - */ - + class Firegento_Pdf_Block_Adminhtml_ColumnOrder - + extends Mage_Adminhtml_Block_System_Config_Form_Field - + { - + protected @@ -113,30 +107,30 @@ '' ; - - + + /** - + * generate html for orderable list - + * - + * @param Varien_Data_Form_Element_Abstract $element form element to render - + * - + * @return string - + */ - + protected @@ -149,20 +143,20 @@ $element ) - + { - + return ' - + <style>.orderable_config li {list-style: disc inside; cursor:move;}</style> - + <p>' . @@ -178,7 +172,7 @@ '<p> - + <ul id="' . @@ -193,7 +187,7 @@ '_list" class="orderable_config"> - + ' . @@ -209,10 +203,10 @@ ' - + </ul> - + <input type="hidden" value="' . @@ -237,7 +231,7 @@ . - + '" id="' @@ -253,10 +247,10 @@ '"> - + <script type="text/javascript"> - + Sortable.create("' . @@ -271,10 +265,10 @@ '_list", { - + onUpdate: function() { - + var inheritCheckbox = $("' . @@ -289,28 +283,28 @@ '_inherit"); - + if (inheritCheckbox) { - + inheritCheckbox.checked=false; - + } - + var newOrder=""; - + $A(this.element.children).each(function(item){ - + var current = $(item).attributes["data-column"].value; - + if ("disabled" == current) { - + $("' . @@ -325,43 +319,43 @@ '").value = newOrder; - + } else { - + if (0 < newOrder.length) { - + newOrder+=","; - + } - + newOrder+=current; - + } - + }); - + validateSortableWidth(); - + } - + }); - + validateSortableWidth = function () { - + var newWidth=0; - + $A($("' . @@ -376,22 +370,22 @@ '_list").children).each(function(item){ - + var current = $(item).attributes["data-column"].value; - + if ($(item.attributes["data-width"])) { - + newWidth += parseInt($(item).attributes["data-width"].value); - + } else if ("disabled" == current) { - + if (240 < newWidth) { - + $("' . @@ -406,7 +400,7 @@ '_warning").innerHTML = "' - + . @@ -421,7 +415,7 @@ '"; - + $("' . @@ -436,10 +430,10 @@ '_warning").show(); - + } else { - + $("' . @@ -454,56 +448,56 @@ '_warning").hide(); - + } - + } - + }); - + }; - + validateSortableWidth(); - + </script> - + ' ; - + } - - + + /** - + * get html for list - + * - + * @param Varien_Data_Form_Element_Abstract $element form element to render - + * - + * @return string - + */ - + protected @@ -516,11 +510,11 @@ $element ) - + { - + $availableItems @@ -529,7 +523,7 @@ array ( - + 'price_incl_tax' @@ -557,7 +551,7 @@ ) , - + 'price' @@ -585,7 +579,7 @@ ) , - + 'qty' @@ -613,7 +607,7 @@ ) , - + 'subtotal_incl_tax' @@ -641,7 +635,7 @@ ) , - + 'subtotal' @@ -669,7 +663,7 @@ ) , - + 'tax' @@ -697,7 +691,7 @@ ) , - + 'tax_rate' @@ -725,12 +719,12 @@ ) , - + ) ; - + $activeItems @@ -741,7 +735,7 @@ ) ; - + foreach @@ -765,7 +759,7 @@ { - + $item @@ -777,7 +771,7 @@ ) ; - + if @@ -793,7 +787,7 @@ { - + $activeItems [ @@ -808,7 +802,7 @@ ] ; - + unset ( @@ -819,16 +813,16 @@ ) ; - + } - + } - - + + $this -> @@ -838,7 +832,7 @@ ) ; - + $this -> @@ -846,9 +840,9 @@ .= - '<li id="pdf-column-disabled" data-column="disabled" style="list-style:none"> + '<li id="pdf_column-disabled" data-column="disabled" style="list-style:none"> - + <div id="' . @@ -863,10 +857,10 @@ '_warning" style="display:none" class="validation-advice"></div> - + <br /> - + ' . @@ -882,11 +876,11 @@ ' - + </li>' ; - + $this -> @@ -896,8 +890,8 @@ ) ; - - + + return @@ -906,34 +900,34 @@ _sortableListHtml ; - + } - - + + /** - + * add items to list - + * - + * @param array $items items to add - + * - + * @return $this - + */ - + protected @@ -944,11 +938,11 @@ $items ) - + { - + foreach @@ -964,7 +958,7 @@ { - + $this -> @@ -975,22 +969,22 @@ sprintf ( - + - '<li id="pdf-column-%s" data-column="%s" data-width="%s">%s</li>' + '<li id="pdf_column-%s" data-column="%s" data-width="%s">%s</li>' , - + $name , - + $name , - + $item [ @@ -998,35 +992,36 @@ ] , - + $item [ 'label' ] - + ) ; - + } - + + return $this ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xml new file mode 100644 index 0000000..185af8b --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php.xml @@ -0,0 +1,383 @@ + + + + + <?php + + + + class + + FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes + + + + extends + + Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract + + + { + + + + + /** + + + * @var FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + + + */ + + + + protected + + $_countryRenderer + ; + + + + + /** + + + * Retrieve country column renderer + + + * + + + * @return FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + + + */ + + + + protected + + function + + _getCountryRenderer + ( + ) + + + + { + + + + if + + ( + ! + $this + -> + _countryRenderer + ) + + { + + + + $this + -> + _countryRenderer + + = + + $this + -> + getLayout + ( + ) + -> + createBlock + ( + + + + 'firegento_pdf/adminhtml_system_config_form_field_notes_country' + , + + '' + , + + + + array + ( + 'is_render_to_js_template' + + => + + true + ) + + + + ) + ; + + + + } + + + + + return + + $this + -> + _countryRenderer + ; + + + + } + + + + + /** + + + * Add columns, change button labels etc. + + + */ + + + + protected + + function + + _prepareToRender + ( + ) + + + + { + + + + $this + -> + addColumn + ( + + + + 'country' + , + + array + ( + + + + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Shipping Country' + ) + , + + + + 'renderer' + + => + + $this + -> + _getCountryRenderer + ( + ) + + + + ) + + + + ) + ; + + + + $this + -> + addColumn + ( + + + + 'note' + , + + array + ( + + + + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Note' + ) + + + + ) + + + + ) + ; + + + + $this + -> + _addButtonLabel + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Add Note' + ) + ; + + + + $this + -> + _addAfter + + = + + false + ; + + + + } + + + + + /** + + + * Prepare existing row data object + + + * + + + * @param Varien_Object + + + */ + + + + protected + + function + + _prepareArrayRow + ( + Varien_Object + + $row + ) + + + + { + + + + $row + -> + setData + ( + + + + 'option_extra_attr_' + + . + + $this + -> + _getCountryRenderer + ( + ) + -> + calcOptionHash + ( + $row + -> + getData + ( + 'country' + ) + ) + , + + + + 'selected="selected"' + + + + ) + ; + + + + } + + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xml new file mode 100644 index 0000000..f24e714 --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php.xml @@ -0,0 +1,205 @@ + + + + + <?php + + + + /** + + + * HTML select element block with country options + + + */ + + + class + + FireGento_Pdf_Block_Adminhtml_System_Config_Form_Field_Notes_Country + + + + extends + + Mage_Core_Block_Html_Select + + + { + + + + + /** + + + * @param $value + + + * + + + * @return mixed + + + */ + + + + public + + function + + setInputName + ( + $value + ) + + + + { + + + + return + + $this + -> + setName + ( + $value + ) + ; + + + + } + + + + + /** + + + * Render block HTML + + + * + + + * @return string + + + */ + + + + public + + function + + _toHtml + ( + ) + + + + { + + + + if + + ( + ! + $this + -> + getOptions + ( + ) + ) + + { + + + + $countryModel + + = + + Mage + :: + getModel + ( + 'adminhtml/system_config_source_country' + ) + ; + + + + foreach + + ( + $countryModel + -> + toOptionArray + ( + ) + + as + + $country + ) + + { + + + + $this + -> + addOption + ( + $country + [ + 'value' + ] + , + + $country + [ + 'label' + ] + ) + ; + + + + } + + + + } + + + + + return + + parent + :: + _toHtml + ( + ) + ; + + + + } + + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Data.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Data.php.xml index f17a2f8..1ecc92b 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Data.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Data.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,108 +53,156 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 + */ + - */ + /** + + + * Dummy data helper for translation issues. - - /** + * - * Dummy data helper for translation issues. + * @category FireGento - * + * @package FireGento_Pdf - * @category FireGento + * @author FireGento Team <team@firegento.com> - * @package FireGento_Pdf + */ - * @author FireGento Team <team@firegento.com> + class + + FireGento_Pdf_Helper_Data + + extends + + Mage_Core_Helper_Abstract - * @copyright 2013 FireGento Team (http://www.firegento.com) + { - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + const + + XML_PATH_FIREGENTO_PDF_LOGO_POSITION + + = + + 'sales_pdf/firegento_pdf/logo_position' + ; - * @version $Id:$ + + const + + XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER + + = + + 'sales_pdf/invoice/show_customer_number' + ; - * @since 0.1.0 + + const + + XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER + + = + + 'sales_pdf/shipment/show_customer_number' + ; - */ + + const + + XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER + + = + + 'sales_pdf/creditmemo/show_customer_number' + ; - class + + const - FireGento_Pdf_Helper_Data + XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER - extends + = - Mage_Core_Helper_Abstract + 'sales_pdf/invoice/show_customer_vatnumber' + ; - { + + const + + XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER + + = + + 'sales_pdf/shipment/show_customer_vatnumber' + ; const - XML_PATH_FIREGENTO_PDF_LOGO_POSITION + XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER = - 'sales_pdf/firegento_pdf/logo_position' + 'sales_pdf/creditmemo/show_customer_vatnumber' ; const - XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER + XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER = - 'sales_pdf/invoice/show_customer_number' + 'sales_pdf/invoice/guestorder_customer_number' ; const - XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER + XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER = - 'sales_pdf/shipment/show_customer_number' + 'sales_pdf/shipment/guestorder_customer_number' ; const - XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER + XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER = - 'sales_pdf/creditmemo/show_customer_number' + 'sales_pdf/creditmemo/guestorder_customer_number' ; @@ -190,8 +238,97 @@ 'sales_pdf/creditmemo/filename_export_pattern' ; - + + + const + + XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + = + + 'sales_pdf/invoice/filename_export_pattern_for_multiple_documents' + ; + + + const + + XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + = + + 'sales_pdf/shipment/filename_export_pattern_for_multiple_documents' + ; + + + + const + + XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + = + + 'sales_pdf/creditmemo/filename_export_pattern_for_multiple_documents' + ; + + + + const + + XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE + + = + + 'sales_pdf/firegento_pdf/page_size' + ; + + + + + const + + XML_PATH_COLOR_TEXT + + = + + 'sales_pdf/firegento_pdf_colors/text' + ; + + + + const + + XML_PATH_COLOR_LABELS + + = + + 'sales_pdf/firegento_pdf_colors/labels' + ; + + + + const + + XML_PATH_COLOR_TABLE_HEADER + + = + + 'sales_pdf/firegento_pdf_colors/table_header' + ; + + + + const + + XML_PATH_COLOR_FOOTER + + = + + 'sales_pdf/firegento_pdf_colors/footer' + ; + + + const @@ -202,7 +339,7 @@ 'sales_pdf/firegento_pdf_fonts/regular_font' ; - + const @@ -213,7 +350,7 @@ 'sales_pdf/firegento_pdf_fonts/bold_font' ; - + const @@ -224,8 +361,8 @@ 'sales_pdf/firegento_pdf_fonts/italic_font' ; - - + + const @@ -236,33 +373,33 @@ '/firegento_pdf/fonts' ; - - + + /** - + * Return the order id or false if order id should not be displayed on document. - + * - + * @param Mage_Sales_Model_Order $order order to get id from - + * @param string $mode differ between creditmemo, invoice, etc. - + * - + * @return mixed - + */ - + public @@ -282,11 +419,11 @@ 'invoice' ) - + { - + switch @@ -296,14 +433,14 @@ { - + case 'invoice' : - + $putOrderIdOnInvoice @@ -314,14 +451,14 @@ getStoreConfigFlag ( - + Mage_Sales_Model_Order_Pdf_Abstract :: XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID , - + $order -> @@ -329,12 +466,12 @@ ( ) - + ) ; - + if @@ -344,7 +481,7 @@ { - + return @@ -355,24 +492,24 @@ ) ; - + } - + break ; - - + + case 'shipment' : - + $putOrderIdOnShipment @@ -383,14 +520,14 @@ getStoreConfigFlag ( - + Mage_Sales_Model_Order_Pdf_Abstract :: XML_PATH_SALES_PDF_SHIPMENT_PUT_ORDER_ID , - + $order -> @@ -398,12 +535,12 @@ ( ) - + ) ; - + if @@ -413,7 +550,7 @@ { - + return @@ -424,24 +561,24 @@ ) ; - + } - + break ; - - + + case 'creditmemo' : - + $putOrderIdOnCreditmemo @@ -452,14 +589,14 @@ getStoreConfigFlag ( - + Mage_Sales_Model_Order_Pdf_Abstract :: XML_PATH_SALES_PDF_CREDITMEMO_PUT_ORDER_ID , - + $order -> @@ -467,12 +604,12 @@ ( ) - + ) ; - + if @@ -482,7 +619,7 @@ { - + return @@ -493,54 +630,55 @@ ) ; - + } - + break ; - + } - + + return false ; - + } - - + + /** - + * Whether the logo should be shown in full width. - + * - + * @param mixed $store store to get information from - + * - + * @return bool whether the logo should be shown in full width - + */ - + public @@ -551,11 +689,11 @@ $store ) - + { - + $configSetting @@ -566,7 +704,7 @@ getStoreConfig ( - + self :: @@ -575,12 +713,12 @@ $store - + ) ; - + $fullWidth @@ -591,7 +729,8 @@ FULL_WIDTH ; - + + return @@ -602,37 +741,37 @@ $fullWidth ; - + } - - + + /** - + * Whether the customer number should be shown. - + * - + * @param string $mode the mode of this document like invoice, shipment or creditmemo - + * @param mixed $store store to get information from - + * - + * @return bool whether the customer number should be shown - + */ - + public @@ -648,13 +787,17 @@ , $store + + = + + null ) - + { - + switch @@ -664,14 +807,14 @@ { - + case 'invoice' : - + return @@ -680,30 +823,30 @@ getStoreConfigFlag ( - + self :: XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER , - + $store - + ) ; - + case 'shipment' : - + return @@ -712,30 +855,30 @@ getStoreConfigFlag ( - + self :: XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER , - + $store - + ) ; - + case 'creditmemo' : - + return @@ -744,27 +887,28 @@ getStoreConfigFlag ( - + self :: XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER , - + $store - + ) ; - + } - + + return @@ -773,466 +917,1075 @@ // backwards compatibility - + } - - + + /** - - * Return scaled image sizes based on an path to an image file. + + * Whether the customer VAT number should be shown. - + * - - * @param string $image Url to image file. - - - * @param int $maxWidth max width the image can have + + * @param string $mode the mode of this document like invoice, shipment or creditmemo - - * @param int $maxHeight max height the image can have + + * @param mixed $store store to get information from - + * - - * @return array with 2 elements - width and height. + + * @return bool whether the customer number should be shown - + */ - + public function - getScaledImageSize + showCustomerVATNumber ( - $image - , + $mode - $maxWidth - , + = - $maxHeight - ) - - - - { - - - - list - ( - $width + 'invoice' , - $height - ) + $store = - getimagesize - ( - $image + null ) - ; - - + + + { + + - if + switch ( - $height - - > - - $maxHeight - - or - - $width - - > - - $maxWidth + $mode ) { - - - // Calculate max variance to match dimensions. - - + - $widthVar - - = - - $width - - / + case - $maxWidth - ; + 'invoice' + : - - - $heightVar - - = - - $height - - / + + + return - $maxHeight - ; + Mage + :: + getStoreConfigFlag + ( - - - - // Calculate scale factor to match dimensions. + + + self + :: + XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER + , - - - if - - ( - $widthVar - - > - - $heightVar - ) - - { + + + $store - + - $scale - - = - - $maxWidth - - / - - $width + ) ; - + - } - - else + case - { + 'shipment' + : - + - $scale - - = - - $maxHeight - - / + return - $height - ; + Mage + :: + getStoreConfigFlag + ( - - - } + + + self + :: + XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER + , - - - - // Calculate new dimensions. + + + $store - + + + ) + ; + + - $height + case - = - - round - ( - $height - - * - - $scale - ) - ; + 'creditmemo' + : - - - $width - - = + + + return - round + Mage + :: + getStoreConfigFlag ( - $width - - * - - $scale + + + + self + :: + XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER + , + + + + $store + + + ) ; - + } - - + + return - array - ( - $width - , - - $height - ) + true ; + + // backwards compatibility - + } - - + + /** - - * Return export pattern config value + + * Get customer number for guest orders. - + * - - * @param string $type the type of this document like invoice, shipment or creditmemo + + * @param string $mode the mode of this document like invoice, shipment or creditmemo - + + * @param mixed $store store to get information from + + * - - * @return string + + * @return string customer number for guest orders - + */ - + public function - getExportPattern + getGuestorderCustomerNo ( - $type + $mode + + = + + 'invoice' + , + + $store + + = + + null ) - + { - + switch ( - $type + $mode ) { - + case 'invoice' : - + return + trim + ( + + + Mage :: - getStoreConfig + getStoreConfigFlag ( - - + + self :: - XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN + XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER + , - + + + $store + + + + ) + + ) ; - + case 'shipment' : - + return + trim + ( + + + Mage :: - getStoreConfig + getStoreConfigFlag ( - - + + self :: - XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN + XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER + , - + + + $store + + + + ) + + ) ; - + case 'creditmemo' : - + return + trim + ( + + + Mage :: - getStoreConfig + getStoreConfigFlag ( - - + + self :: - XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN + XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER + , - + + + $store + + + + ) + + ) ; - + } - + + return true ; + + // backwards compatibility - + } - - + + /** - - * Gets the variables which can be used as a placeholder in the filename. + + * Return scaled image sizes based on an path to an image file. - + * - - * @param Mage_Core_Model_Abstract $model the model instance + + * @param string $image Url to image file. - + + * @param int $maxWidth max width the image can have + + + * @param int $maxHeight max height the image can have + + * - - * @return array with the variables which can be use as placeholders in the filename + + * @return array with 2 elements - width and height. - + */ - + public function - getModelVars + getScaledImageSize ( - $model + $image + , + + $maxWidth + , + + $maxHeight ) - + { - + - if - + list ( - ! - $model - - instanceof + $width + , - Mage_Sales_Model_Order + $height ) - { - - - - switch + = + getimagesize ( - $model + $image ) - - { + ; - - - case - - $model + + + + if + + ( + $height + + > + + $maxHeight + + or + + $width + + > + + $maxWidth + ) + + { + + + + // Calculate max variance to match dimensions. + + + + $widthVar + + = + + $width + + / + + $maxWidth + ; + + + + $heightVar + + = + + $height + + / + + $maxHeight + ; + + + + + // Calculate scale factor to match dimensions. + + + + if + + ( + $widthVar + + > + + $heightVar + ) + + { + + + + $scale + + = + + $maxWidth + + / + + $width + ; + + + + } + + else + + { + + + + $scale + + = + + $maxHeight + + / + + $height + ; + + + + } + + + + + // Calculate new dimensions. + + + + $height + + = + + round + ( + $height + + * + + $scale + ) + ; + + + + $width + + = + + round + ( + $width + + * + + $scale + ) + ; + + + + } + + + + + return + + array + ( + $width + , + + $height + ) + ; + + + + } + + + + + /** + + + * Return export pattern config value + + + * + + + * @param string $type the type of this document like invoice, shipment or creditmemo + + + * + + + * @return string + + + */ + + + + public + + function + + getExportPattern + ( + $type + ) + + + + { + + + + switch + + ( + $type + ) + + { + + + + case + + 'invoice' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN + + + + ) + ; + + + + case + + 'shipment' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN + + + + ) + ; + + + + case + + 'creditmemo' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN + + + + ) + ; + + + + } + + + + + return + + true + ; + + + + } + + + + + /** + + + * Return export pattern for multiple documents config value + + + * + + + * @param string $type the type of this document like invoice, shipment or creditmemo + + + * + + + * @return string + + + */ + + + + public + + function + + getExportPatternForMultipleDocuments + ( + $type + ) + + + + { + + + + switch + + ( + $type + ) + + { + + + + case + + 'invoice' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + + + ) + ; + + + + case + + 'shipment' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + + + ) + ; + + + + case + + 'creditmemo' + : + + + + return + + Mage + :: + getStoreConfig + ( + + + + self + :: + XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + + + + ) + ; + + + + } + + + + + return + + true + ; + + + + } + + + + + /** + + + * Gets the variables which can be used as a placeholder in the filename. + + + * + + + * @param Mage_Core_Model_Abstract $model the model instance + + + * + + + * @return array with the variables which can be use as placeholders in the filename + + + */ + + + + public + + function + + getModelVars + ( + $model + ) + + + + { + + + + if + + ( + ! + $model + + instanceof + + Mage_Sales_Model_Order + ) + + { + + + + switch + + ( + $model + ) + + { + + + + case + + $model instanceof Mage_Sales_Model_Order_Invoice : - + + + $specificVars + + = + + array + ( + + + + '{{invoice_id}}' + + => + + $model + -> + getIncrementId + ( + ) + + + + ) + ; + + + + break + ; + + + + case + + $model + + instanceof + + Mage_Sales_Model_Order_Shipment + : + + + + $specificVars + + = + + array + ( + + + + '{{shipment_id}}' + + => + + $model + -> + getIncrementId + ( + ) + + + + ) + ; + + + + break + ; + + + + case + + $model + + instanceof + + Mage_Sales_Model_Order_Creditmemo + : + + $specificVars @@ -1241,52 +1994,152 @@ array ( - - - '{{invoice_id}}' - + + + '{{creditmemo_id}}' + + => + + $model + -> + getIncrementId + ( + ) + + + + ) + ; + + + + } + + + + + $order + + = + + $model + -> + getOrder + ( + ) + ; + + + + $commonVars + + = + + array + ( + + + + '{{order_id}}' + => - $model + $order -> getIncrementId ( ) + , - - + + + '{{customer_id}}' + + => + + $order + -> + getCustomerId + ( ) - ; + , - - - break - ; + + + '{{customer_name}}' + + => + + $order + -> + getCustomerName + ( + ) + , - + - case + '{{customer_firstname}}' - $model + => - instanceof + $order + -> + getCustomerFirstname + ( + ) + , + + + + '{{customer_lastname}}' + + => - Mage_Sales_Model_Order_Shipment - : + $order + -> + getCustomerLastname + ( + ) - - + + + ) + ; + + + + + return + + array_merge + ( $specificVars + , - = + $commonVars + ) + ; + + + + } + + else + + { + + + + return array ( - - - '{{shipment_id}}' - + + + '{{order_id}}' + => $model @@ -1294,299 +2147,371 @@ getIncrementId ( ) + , - - + + + '{{customer_id}}' + + => + + $model + -> + getCustomerId + ( ) - ; + , - - - break - ; + + + '{{customer_name}}' + + => + + $model + -> + getCustomerName + ( + ) + , - + - case + '{{customer_firstname}}' + + => $model + -> + getCustomerFirstname + ( + ) + , + + + + '{{customer_lastname}}' + + => - instanceof + $model + -> + getCustomerLastname + ( + ) + + + + ) + ; + + + + } + + + + } + + + + + /** + + + * The filename of the exported file. + + + * + + + * @param string $type the type of this document like invoice, shipment or creditmemo + + + * @param Mage_Core_Model_Abstract $model the model instance + + + * + + + * @return string the filename of the exported file + + + */ + + + + public - Mage_Sales_Model_Order_Creditmemo - : + function + + getExportFilename + ( + $type + , + + $model + ) - - - $specificVars + + + { + + + + $type = - array ( + ! + $type + ) + + ? + + 'invoice' + + : + + $type + ; - - - '{{creditmemo_id}}' + + + $pattern - => + = - $model + $this -> - getIncrementId + getExportPattern ( + $type ) + ; - - + + + if + + ( + ! + $pattern + ) + + { + + + + if + + ( + $type + + == + + 'shipment' ) + + { + + + + $pattern + + = + + 'packingslip' + ; + + + + } + + else + + { + + + + $pattern + + = + + $type ; - + } - + + - $order + $date = - $model - -> - getOrder + Mage + :: + getSingleton ( + 'core/date' ) ; - + - $commonVars - - = + $pattern - array - ( - - - - '{{order_id}}' - - => + .= - $order + $date -> - getIncrementId + date ( + 'Y-m-d_H-i-s' ) - , + ; - - - '{{customer_id}}' + - => + } + + + + + if - $order - -> - getCustomerId ( - ) + substr + ( + $pattern , - - - - '{{customer_name}}' - - => - $order - -> - getCustomerName - ( + - + 4 ) - , - - - - '{{customer_firstname}}' - => + != - $order - -> - getCustomerFirstname - ( + '.pdf' ) - , - - - - '{{customer_lastname}}' - - => - $order - -> - getCustomerLastname - ( - ) - - - - ) - ; + { - + - return + $pattern - array_merge - ( - $specificVars - , + = - $commonVars - ) + $pattern + + . + + '.pdf' ; - + } - - else - - { - - - return + + + + $path - array - ( - - - - '{{order_id}}' - - => + = - $model - -> - getIncrementId + strftime ( - ) + $pattern , - - - - '{{customer_id}}' - - => - $model - -> - getCustomerId + strtotime ( - ) - , - - - - '{{customer_name}}' - - => - $model -> - getCustomerName + getCreatedAt ( ) - , + ) + ) + ; - - - '{{customer_firstname}}' + + + $vars - => + = - $model + $this -> - getCustomerFirstname + getModelVars ( + $model ) - , + ; - - - '{{customer_lastname}}' - - => + + + + return - $model - -> - getCustomerLastname + strtr ( - ) - - - + $path + , + + $vars ) ; - - - } - - + } - - + + /** - - * The filename of the exported file. + + * The filename of the exported file if multiple documents are printed at once. - + * - - * @param string $type the type of this document like invoice, shipment or creditmemo - - - * @param Mage_Core_Model_Abstract $model the model instance + + * @param string $type the type of this document like invoice, shipment or creditmemo - + * - + * @return string the filename of the exported file - + */ - + public function - getExportFilename + getExportFilenameForMultipleDocuments ( $type - , - - $model ) - + { - + $type @@ -1606,7 +2531,7 @@ $type ; - + $pattern @@ -1614,13 +2539,13 @@ $this -> - getExportPattern + getExportPatternForMultipleDocuments ( $type ) ; - + if @@ -1631,7 +2556,52 @@ { - + + + if + + ( + $type + + == + + 'shipment' + ) + + { + + + + $pattern + + = + + 'packingslip' + ; + + + + } + + else + + { + + + + $pattern + + = + + $type + ; + + + + } + + + $date @@ -1645,15 +2615,11 @@ ) ; - + $pattern - = - - $type - - . + .= $date -> @@ -1663,11 +2629,12 @@ ) ; - + } - + + if @@ -1688,7 +2655,7 @@ { - + $pattern @@ -1701,120 +2668,386 @@ '.pdf' ; - + } - - + + - $path - - = + return strftime ( $pattern - , + ) + ; + + + + } + + + + + /** + + + * Returns the path where the fonts reside. + + + * + + + * @return string the path where the fonts reside + + + */ + + + + public - strtotime + function + + getFontPath ( - $model - -> - getCreatedAt + ) + + + + { + + + + return + + Mage + :: + getBaseDir ( + 'media' ) + + . + + self + :: + FONT_PATH_IN_MEDIA + ; + + + + } + + + + + public + + function + + getPageSizeConfigPath + ( ) + + + + { + + + + return + + Mage + :: + getStoreConfig + ( + self + :: + XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE ) ; - + + + } + + + + + /** + + + * Get configured PDF color + + + * + + + * @param string $path System config path + + + * @return Zend_Pdf_Color_Html + + + */ + + + + protected + + function + + getColor + ( + $path + ) + + + + { + + - $vars + return - = + new + + Zend_Pdf_Color_Html + ( + '#' + + . + + trim + ( + $path + ) + , + + '#' + ) + ; + + + + } + + + + /** + + + * Get text color + + + * + + + * @return Zend_Pdf_Color_Html + + + */ + + + + public + + function + + getTextColor + ( + ) + + + + { + + + + return $this -> - getModelVars + getColor ( - $model + Mage + :: + getStoreConfig + ( + self + :: + XML_PATH_COLOR_TEXT + ) ) ; - - + + + } + + + + /** + + + * Get table header color + + + * + + + * @return Zend_Pdf_Color_Html + + + */ + + + + public + + function + + getHeaderColor + ( + ) + + + + { + + return - strtr + $this + -> + getColor ( - $path - , - - $vars + Mage + :: + getStoreConfig + ( + self + :: + XML_PATH_COLOR_TABLE_HEADER + ) ) ; - + } - - + /** - - * Returns the path where the fonts reside. + + * Get footer color - + * - - * @return string the path where the fonts reside + + * @return Zend_Pdf_Color_Html - + */ - + public function - getFontPath + getFooterColor ( ) - + { - + return + $this + -> + getColor + ( Mage :: - getBaseDir + getStoreConfig ( - 'media' + self + :: + XML_PATH_COLOR_FOOTER + ) ) + ; + + + + } + + + + /** + + + * Get label color + + + * + + + * @return Zend_Pdf_Color_Html + + + */ + + + + public - . + function + + getLabelColor + ( + ) + + + + { + + + + return + $this + -> + getColor + ( + Mage + :: + getStoreConfig + ( self :: - FONT_PATH_IN_MEDIA + XML_PATH_COLOR_LABELS + ) + ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Invoice.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Invoice.php.xml new file mode 100644 index 0000000..eaeed80 --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Helper/Invoice.php.xml @@ -0,0 +1,296 @@ + + + + + <?php + + + /** + + + * This file is part of a FireGento e.V. module. + + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + + /** + + + * Helper for invoice creation. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + + class + + FireGento_Pdf_Helper_Invoice + + extends + + Mage_Core_Helper_Abstract + + + { + + + + + /** + + + * Gets the notes for the shipping country of the given order. + + + * + + + * @param Mage_Sales_Model_Order $order + + + * + + + * @return array the notes for the shipping country of the given order - may be empty! + + + */ + + + + public + + function + + getShippingCountryNotes + ( + Mage_Sales_Model_Order + + $order + ) + + + + { + + + + if + + ( + ! + $order + -> + getIsVirtual + ( + ) + ) + + { + + + + $shippingCountryId + + = + + $order + -> + getShippingAddress + ( + ) + -> + getCountryId + ( + ) + ; + + + + $countryNotes + + = + + unserialize + ( + Mage + :: + getStoreConfig + ( + 'sales_pdf/invoice/shipping_country_notes' + ) + ) + ; + + + + if + + ( + $countryNotes + ) + + { + + + + $shippingCountryNotes + + = + + array + ( + ) + ; + + + + foreach + + ( + $countryNotes + + as + + $countryNote + ) + + { + + + + if + + ( + $countryNote + [ + 'country' + ] + + == + + $shippingCountryId + ) + + { + + + + $shippingCountryNotes + [ + ] + + = + + $countryNote + [ + 'note' + ] + ; + + + + } + + + + } + + + + + return + + $shippingCountryNotes + ; + + + + } + + + + } + + + + + return + + array + ( + ) + ; + + + + } + + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xml index 2e573bd..bb1adbf 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Creditmemo.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,100 +53,86 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Creditmemo model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Creditmemo + + extends + + Mage_Sales_Model_Order_Pdf_Creditmemo - + { - - + + /** - + * The actual PDF engine responsible for rendering the file. - + * @var Mage_Sales_Model_Order_Pdf_Abstract - + */ - + - private + protected $_engine ; - - + + /** - + * get pdf renderer engine - + * - + * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Creditmemo - + */ - + protected @@ -156,11 +142,11 @@ ( ) - + { - + if @@ -173,7 +159,7 @@ { - + $modelClass @@ -187,7 +173,7 @@ ) ; - + $engine @@ -201,23 +187,35 @@ ) ; - - + + if ( ! $engine + + || + + $engine + + instanceof + + FireGento_Pdf_Model_Creditmemo ) { - + // Fallback to Magento standard creditmemo layout. - + + + // use new here to circumvent our own rewrite + + $engine @@ -230,12 +228,12 @@ ) ; - + } - - + + $this -> @@ -246,12 +244,12 @@ $engine ; - + } - - + + return @@ -260,34 +258,34 @@ _engine ; - + } - - + + /** - + * get pdf object - + * - + * @param array|Varien_Data_Collection $creditmemos creditmemos to render - + * - + * @return Zend_Pdf - + */ - + public @@ -304,11 +302,11 @@ ) ) - + { - + return @@ -324,13 +322,13 @@ ) ; - + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xml index aeacfaf..55c6460 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,71 +53,63 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - - + + /** - + * Abstract pdf model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + abstract class FireGento_Pdf_Model_Engine_Abstract - + extends Mage_Sales_Model_Order_Pdf_Abstract - + { - + + + /** + + + * @var array + + + */ + + public @@ -142,6 +134,16 @@ ) ; + + + /** + + + * @var array + + + */ + public @@ -156,46 +158,84 @@ ; + + /** + + + * @var string + + + */ + + public $mode ; - + + + /** + + + * @var string + + + */ + + public $encoding ; - + + + /** + + + * @var string + + + */ + + public $pagecounter ; - - + + + /** + + + * @var mixed[] + + + */ + + protected $_imprint ; - - + /** - + * @var int correct all y values if the logo is full width and bigger than normal - + */ - + protected @@ -206,18 +246,52 @@ 0 ; - - + /** - - * constructor to init settings + + * @var int - + */ - + + + private + + $defaultFontSize + + = + + 10 + ; + + + + /** + + + * @var array + + + */ + + + + private + + $_headerLines + + = + + array + ( + ) + ; + + + public @@ -227,11 +301,11 @@ ( ) - + { - + parent :: @@ -240,8 +314,8 @@ ) ; - - + + $this -> @@ -252,8 +326,8 @@ 'UTF-8' ; - - + + $this -> @@ -272,7 +346,7 @@ ) ; - + $this -> @@ -291,12 +365,100 @@ ) ; - - + + + + $helper + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + ; + + + + + $this + -> + colors + [ + 'text' + ] + + = + + $helper + -> + getTextColor + ( + ) + ; + + + + $this + -> + colors + [ + 'labels' + ] + + = + + $helper + -> + getLabelColor + ( + ) + ; + + + + $this + -> + colors + [ + 'header' + ] + + = + + $helper + -> + getHeaderColor + ( + ) + ; + + + + $this + -> + colors + [ + 'footer' + ] + + = + + $helper + -> + getFooterColor + ( + ) + ; + + + // get the default imprint - + $this -> @@ -312,40 +474,40 @@ ) ; - + } - - + + /** - + * Draw one line - + * - + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param array $draw items to draw - + * @param array $pageSettings page settings to use for new pages - + * - + * @return Zend_Pdf_Page - + */ - + public @@ -354,21 +516,21 @@ drawLineBlocks ( - + Zend_Pdf_Page $page , - + array $draw , - + array @@ -380,13 +542,13 @@ ( ) - + ) { - + foreach @@ -400,7 +562,7 @@ { - + if @@ -428,7 +590,7 @@ { - + Mage :: @@ -440,9 +602,6 @@ ( 'sales' ) - - - -> __ ( @@ -451,14 +610,14 @@ ) ; - + } - + $lines - + = $itemsProp @@ -467,7 +626,7 @@ ] ; - + $height @@ -490,11 +649,13 @@ : - 10 + $this + -> + defaultFontSize ; - - + + if @@ -510,7 +671,7 @@ { - + $shift @@ -519,7 +680,7 @@ 0 ; - + foreach @@ -533,7 +694,7 @@ { - + $maxHeight @@ -542,7 +703,7 @@ 0 ; - + foreach @@ -556,7 +717,7 @@ { - + $lineSpacing @@ -570,9 +731,7 @@ 'height' ] ) - - - + ? $column @@ -585,7 +744,7 @@ $height ; - + if @@ -602,7 +761,7 @@ { - + $column [ @@ -620,51 +779,31 @@ ) ; - + } - + $top = - 0 - ; - - - - foreach - + count ( $column [ 'text' ] - - as - - $part ) - { - - - - $top - - += + * $lineSpacing ; - - - } - - - + + $maxHeight @@ -685,11 +824,11 @@ $maxHeight ; - + } - + $shift @@ -698,11 +837,11 @@ $maxHeight ; - + } - + $itemsProp [ @@ -714,12 +853,12 @@ $shift ; - + } - - + + if @@ -739,7 +878,7 @@ 50 - + || @@ -750,14 +889,12 @@ ( 'sales_pdf/firegento_pdf/show_footer' ) - - - + == 1 - + && @@ -777,13 +914,13 @@ 100 ) - + ) { - + $page @@ -797,12 +934,12 @@ ) ; - + } - - + + foreach @@ -816,7 +953,7 @@ { - + $maxHeight @@ -825,7 +962,7 @@ 0 ; - + foreach @@ -839,7 +976,7 @@ { - + $fontSize @@ -857,7 +994,7 @@ 7 - + : @@ -867,7 +1004,7 @@ ] ; - + if @@ -884,12 +1021,10 @@ { - + $font - - - + = Zend_Pdf_Font @@ -903,7 +1038,7 @@ ) ; - + $page -> @@ -916,7 +1051,7 @@ ) ; - + } @@ -924,7 +1059,7 @@ { - + $fontStyle @@ -941,9 +1076,7 @@ ? 'regular' - - - + : $column @@ -952,7 +1085,7 @@ ] ; - + switch @@ -962,14 +1095,14 @@ { - + case 'bold' : - + $font @@ -986,19 +1119,19 @@ ) ; - + break ; - + case 'italic' : - + $font @@ -1015,17 +1148,17 @@ ) ; - + break ; - + default : - + $font @@ -1038,27 +1171,27 @@ $page , - + $fontSize ) ; - + break ; - + } - + } - - + + if @@ -1075,7 +1208,7 @@ { - + $column [ @@ -1093,12 +1226,12 @@ ) ; - + } - - + + $lineSpacing @@ -1119,24 +1252,22 @@ [ 'height' ] - - - + : $height ; - + $top - + = 0 ; - + foreach @@ -1153,10 +1284,10 @@ { - + $feed - + = $column @@ -1165,7 +1296,7 @@ ] ; - + $textAlign @@ -1182,9 +1313,7 @@ ? 'left' - - - + : $column @@ -1193,10 +1322,10 @@ ] ; - + $width - + = empty @@ -1219,7 +1348,7 @@ ] ; - + switch @@ -1229,14 +1358,14 @@ { - + case 'right' : - + if @@ -1246,7 +1375,7 @@ { - + $feed @@ -1261,9 +1390,7 @@ $feed , - - - + $width , @@ -1274,7 +1401,7 @@ ) ; - + } @@ -1282,17 +1409,11 @@ { - + $feed - = - - $feed - - - - - + -= $this -> @@ -1300,9 +1421,7 @@ ( $part , - - - + $font , @@ -1310,23 +1429,23 @@ ) ; - + } - + break ; - + case 'center' : - + if @@ -1336,7 +1455,7 @@ { - + $feed @@ -1351,9 +1470,7 @@ $feed , - - - + $width , @@ -1364,20 +1481,53 @@ ) ; - + } - + break ; - + } - + + + if + + ( + isset + ( + $column + [ + 'color' + ] + ) + ) + + { + + + + $page + -> + setFillColor + ( + $column + [ + 'color' + ] + ) + ; + + + + } + + $page -> @@ -1402,7 +1552,22 @@ ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'text' + ] + ) + ; + + $top @@ -1411,12 +1576,12 @@ $lineSpacing ; - + } - - + + $maxHeight @@ -1437,11 +1602,11 @@ $maxHeight ; - + } - + $this -> @@ -1452,50 +1617,50 @@ $maxHeight ; - + } - + } - - + + return $page ; - + } - - + + /** - + * Set pdf mode. - + * - + * @param string $mode set mode to differ between creditmemo, invoice, etc. - + * - + * @return FireGento_Pdf_Model_Engine_Abstract - + */ - + public @@ -1506,11 +1671,11 @@ $mode ) - + { - + $this -> @@ -1521,35 +1686,36 @@ $mode ; - + + return $this ; - + } - - + + /** - + * Return pdf mode. - + * - + * @return string - + */ - + public @@ -1559,11 +1725,11 @@ ( ) - + { - + return @@ -1572,34 +1738,34 @@ mode ; - + } - - + + /** - + * Set next line position - + * - + * @param int $height Line-Height - + * - + * @return void - + */ - + protected @@ -1614,11 +1780,11 @@ 15 ) - + { - + $this -> @@ -1629,50 +1795,49 @@ $height ; - + } - - + + /** - + * Insert sender address bar - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * - + * @return void - + */ - + protected function - _insertSenderAddessBar + _insertSenderAddressBar ( - & $page ) - + { - + if @@ -1683,20 +1848,15 @@ ( 'sales_pdf/firegento_pdf/sender_address_bar' ) - - - + != '' - - - ) { - + $this -> @@ -1709,14 +1869,29 @@ ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'labels' + ] + ) + ; + + $page -> drawText ( - + trim ( @@ -1729,7 +1904,7 @@ ) , - + $this -> @@ -1747,57 +1922,74 @@ ) , - + $this -> y , - + + + $this -> encoding - + ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'text' + ] + ) + ; + + } - + } - - + + /** - + * Insert logo - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param mixed $store store to get data from - + * - + * @return void - + */ - + protected @@ -1816,11 +2008,11 @@ null ) - + { - + if @@ -1835,7 +2027,7 @@ { - + $this -> @@ -1848,7 +2040,7 @@ ) ; - + } @@ -1856,7 +2048,7 @@ { - + $this -> @@ -1869,38 +2061,38 @@ ) ; - + } - + } - - + + /** - + * is the setting to show the logo full width? - + * - + * @param mixed $store store we want the config setting from - + * - + * @return bool - + */ - + protected @@ -1911,11 +2103,11 @@ $store ) - + { - + return @@ -1932,37 +2124,37 @@ ) ; - + } - - + + /** - + * Inserts the logo if it is positioned left, center or right. - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param mixed $store store to get data from - + * - + * @return void - + */ - + protected @@ -1970,7 +2162,6 @@ _insertLogoPositioned ( - & $page , @@ -1981,16 +2172,14 @@ null ) - + { - + $imageRatio - - - + = (int) @@ -2000,14 +2189,12 @@ ( 'sales_pdf/firegento_pdf/logo_ratio' , - - - + $store ) ; - + $imageRatio @@ -2022,20 +2209,18 @@ ? - 1 + 100 : $imageRatio ; - - + + $maxwidth - - - + = ( @@ -2059,15 +2244,13 @@ * $imageRatio - - - + / 100 ; - + $maxheight @@ -2076,8 +2259,8 @@ 100 ; - - + + $image @@ -2094,7 +2277,7 @@ ) ; - + if @@ -2114,9 +2297,7 @@ $store ) - - - + . '/sales/store/logo/' @@ -2125,14 +2306,11 @@ $image ) - - - ) { - + $image @@ -2151,16 +2329,14 @@ . '/sales/store/logo/' - - - + . $image ; - - + + list @@ -2179,9 +2355,6 @@ ( 'firegento_pdf' ) - - - -> getScaledImageSize ( @@ -2195,8 +2368,8 @@ ) ; - - + + if @@ -2209,7 +2382,7 @@ { - + $image @@ -2223,13 +2396,11 @@ ) ; - - + + $logoPosition - - - + = Mage @@ -2238,15 +2409,13 @@ ( 'sales_pdf/firegento_pdf/logo_position' , - - - + $store ) ; - - + + switch @@ -2256,21 +2425,21 @@ { - + case 'center' : - + $startLogoAt + + = - + - = - $this -> margin @@ -2288,9 +2457,7 @@ [ 'right' ] - - - + - $this @@ -2315,19 +2482,19 @@ 2 ; - + break ; - + case 'right' : - + $startLogoAt @@ -2345,17 +2512,17 @@ $width ; - + break ; - + default : - + $startLogoAt @@ -2369,12 +2536,12 @@ ] ; - + } - - + + $position [ @@ -2386,7 +2553,7 @@ $startLogoAt ; - + $position [ @@ -2398,7 +2565,7 @@ 720 ; - + $position [ @@ -2417,7 +2584,7 @@ $width ; - + $position [ @@ -2436,8 +2603,8 @@ $height ; - - + + $page -> @@ -2457,9 +2624,7 @@ 'y1' ] , - - - + $position [ 'x2' @@ -2473,45 +2638,45 @@ ) ; - + } - + } - + } - - + + /** - + * inserts the logo from complete left to right - + * - - * @param Zend_Pdf_Page &$page current Zend_Pdf_Page object + + * @param Zend_Pdf_Page $page current Zend_Pdf_Page object - + * @param mixed $store store we need the config setting from - + * - + * @todo merge _insertLogoPositioned and _insertLogoFullWidth - + */ - + protected @@ -2519,7 +2684,6 @@ _insertLogoFullWidth ( - & $page , @@ -2530,16 +2694,14 @@ null ) - + { - + $imageRatio - - - + = (int) @@ -2549,9 +2711,7 @@ ( 'sales_pdf/firegento_pdf/logo_ratio' , - - - + $store ) ; @@ -2582,7 +2742,7 @@ $maxwidth - + = 594 @@ -2643,9 +2803,7 @@ $store ) - - - + . '/sales/store/logo/' @@ -2654,14 +2812,11 @@ $image ) - - - ) { - + $image @@ -2680,16 +2835,14 @@ . '/sales/store/logo/' - - - + . $image ; - - + + list @@ -2708,9 +2861,6 @@ ( 'firegento_pdf' ) - - - -> getScaledImageSize ( @@ -2724,8 +2874,8 @@ ) ; - - + + if @@ -2738,7 +2888,7 @@ { - + $image @@ -2752,13 +2902,11 @@ ) ; - - + + $logoPosition - - - + = Mage @@ -2767,15 +2915,13 @@ ( 'sales_pdf/firegento_pdf/logo_position' , - - - + $store ) ; - - + + switch @@ -2785,19 +2931,21 @@ { - + case 'center' : - + $startLogoAt = - + + + $this -> margin @@ -2806,9 +2954,7 @@ ] + - - - + ( ( $this @@ -2827,9 +2973,7 @@ 'left' ] ) - - - + / 2 @@ -2844,19 +2988,19 @@ 2 ; - + break ; - + case 'right' : - + $startLogoAt @@ -2874,17 +3018,17 @@ $width ; - + break ; - + default : - + $startLogoAt @@ -2893,12 +3037,12 @@ 0 ; - + } - - + + $position [ @@ -2910,7 +3054,7 @@ $startLogoAt ; - + $position [ @@ -2922,7 +3066,7 @@ 663 ; - + $position [ @@ -2941,7 +3085,7 @@ $width ; - + $position [ @@ -2960,8 +3104,8 @@ $height ; - - + + $page -> @@ -2981,9 +3125,7 @@ 'y1' ] , - - - + $position [ 'x2' @@ -2997,7 +3139,7 @@ ) ; - + $this -> @@ -3012,42 +3154,42 @@ 130 ; - + } - + } - + } - - + + /** - + * insert customer address and all header like customer number, etc. - + * - + * @param Zend_Pdf_Page $page current Zend_Pdf_Page - + * @param Mage_Sales_Model_Abstract $source source for the address information - + * @param Mage_Sales_Model_Order $order order to print the document for - + */ - + protected @@ -3056,37 +3198,37 @@ insertAddressesAndHeader ( - + Zend_Pdf_Page $page , - + Mage_Sales_Model_Abstract $source , - + Mage_Sales_Model_Order $order - + ) { - + // Add logo - + $this -> @@ -3103,12 +3245,12 @@ ) ; - - + + // Add billing address - + $this -> @@ -3125,7 +3267,7 @@ _marginTop ; - + $this -> @@ -3138,12 +3280,12 @@ ) ; - - + + // Add sender address - + $this -> @@ -3160,64 +3302,35 @@ _marginTop ; - + $this -> - _insertSenderAddessBar + _insertSenderAddressBar ( $page ) ; - - + + // Add head - + - $this - -> - y - - = - - 592 - - - - - $this - -> - _marginTop - ; + // make sure that header does not overlap address bar - + - $this - -> - insertHeader - ( - $page - , + $headOffset - $order - , + = - $source - ) + 0 ; - - - - /* Add table head */ - - - - // make sure that item table does not overlap heading - - + if @@ -3228,7 +3341,7 @@ > - 575 + 592 - @@ -3239,58 +3352,147 @@ { - + - $this - -> - y + $headOffset = - 575 - - - + 40 + ; + + + + } + + + + $this + -> + y + + = + + 592 + + - + + $headOffset + + - $this -> _marginTop ; - + + + $this + -> + insertHeader + ( + $page + , + + $order + , + + $source + ) + ; + + + + + /* Add table head */ + + + + // make sure that item table does not overlap heading + + + + if + + ( + $this + -> + y + + > + + 575 + + - + + $headOffset + + - + + $this + -> + _marginTop + ) + + { + + + + $this + -> + y + + = + + 575 + + - + + $headOffset + + - + + $this + -> + _marginTop + ; + + } - + } - - + + /** - + * Inserts the customer address. The default address is the billing address. - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param Mage_Sales_Model_Order $order Order object - + * - + * @return void - + */ - + protected @@ -3298,18 +3500,17 @@ _insertCustomerAddress ( - & $page , $order ) - + { - + $this -> @@ -3322,7 +3523,7 @@ ) ; - + $billing @@ -3337,9 +3538,6 @@ getBillingAddress ( ) - - - -> format ( @@ -3348,7 +3546,7 @@ ) ; - + foreach @@ -3362,7 +3560,7 @@ { - + $page -> @@ -3377,7 +3575,7 @@ ) , - + $this -> @@ -3394,13 +3592,15 @@ ( ) , - + + + $this -> y , - + $this -> @@ -3408,7 +3608,7 @@ ) ; - + $this -> @@ -3418,32 +3618,32 @@ ) ; - + } - + } - - + + /** - + * get the offset to position the address block left or right - + * - + * @return int - + */ - + protected @@ -3453,107 +3653,89 @@ ( ) - + { - + - if + $position + + = - ( Mage :: getStoreConfig ( 'sales_pdf/firegento_pdf/headerblocks_position' ) + ; - - - == + + + $left + + = FireGento_Pdf_Model_System_Config_Source_Headerblocks :: LEFT + ; - + - ) + return - { - - - - $offsetAdjustment + $position - = + === - 0 - ; - - - - } + $left - else + ? - { - - - - $offsetAdjustment + 0 - = + : 315 ; - - - } - - - - return - - $offsetAdjustment - ; - - + } - - + + + /** - + * Insert Header - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param Mage_Sales_Model_Order $order Order object - + * @param object $document Document object - + * - + * @return void - + */ - + protected @@ -3561,7 +3743,6 @@ insertHeader ( - & $page , @@ -3571,11 +3752,24 @@ $document ) - + { - + + + $this + -> + _headerLines + + = + + array + ( + ) + ; + + $page -> @@ -3585,13 +3779,13 @@ -> colors [ - 'black' + 'text' ] ) ; - - + + $mode @@ -3604,8 +3798,8 @@ ) ; - - + + $this -> @@ -3618,31 +3812,40 @@ ) ; - - + + + + $title + + = + + 'Invoice' + ; + + if ( $mode - == + === - 'invoice' + 'creditmemo' ) { - + $title = - 'Invoice' + 'Creditmemo' ; - + } @@ -3651,44 +3854,28 @@ ( $mode - == + === 'shipment' ) { - - - $title - - = - - 'Shipment' - ; - - - - } - - else - - { - - + $title = - 'Creditmemo' + 'Packingslip' ; - + } - + + $page -> @@ -3706,9 +3893,7 @@ $title ) , - - - + $this -> margin @@ -3728,19 +3913,8 @@ ) ; - - - - $this - -> - _setFontRegular - ( - $page - ) - ; - - - + + $this -> @@ -3751,106 +3925,100 @@ 80 ; - + - $labelRightOffset - + $width + = - 180 - - + - - $this - -> - getHeaderblockOffset - ( - ) + 80 ; - - + + - $valueRightOffset - + $color + = - 10 - - + - $this -> - getHeaderblockOffset - ( - ) + colors + [ + 'black' + ] ; - + - $font + $fillColor = $this -> - _setFontRegular - ( - $page - , - - 10 - ) + colors + [ + 'black' + ] ; - + - $width - + $fontSize + = - 80 + null ; - + - $numberOfLines - + $bold + = - 0 + false ; - - - + + // Invoice/shipment/creditmemo Number - + + + $numberTitle + + = + + 'Invoice number:' + ; + + if ( $mode - == + === - 'invoice' + 'creditmemo' ) { - + $numberTitle = - 'Invoice number:' + 'Creditmemo number:' ; - + } @@ -3859,14 +4027,14 @@ ( $mode - == + === 'shipment' ) { - + $numberTitle @@ -3875,36 +4043,39 @@ 'Shipment number:' ; - + } - - else - - { - - - $numberTitle + + + + $this + -> + _headerLines + [ + ] = - 'Creditmemo number:' - ; - - - - } - - - - $page - -> - drawText + array ( - + + 'content' + + => + + array + ( + + + + 'label' + + => + Mage :: helper @@ -3918,380 +4089,363 @@ ) , - - - ( - $this - -> - margin - [ - 'right' - ] + + + 'value' - - + => - $labelRightOffset + $document + -> + getIncrementId + ( + ) + , + + + ) , + + + + 'fontSize' - $this - -> - y + => + + $fontSize , - + - $this - -> - encoding + 'bold' + + => + + $bold + , - + ) ; - - + + + + // Order Number + + - $incrementId + $putOrderId = - $document + $this -> - getIncrementId + _putOrderId ( + $order ) ; - + - $page - -> - drawText + if + ( + $putOrderId + ) + + { - - - $incrementId - , - - + - ( $this -> - margin + _headerLines [ - 'right' ] - - + = - $valueRightOffset + array + ( - + - - + 'content' + + => - $this - -> - widthForStringUsingFontSize + array ( - $incrementId - , + + + + 'label' - $font - , + => - 10 - ) + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Order number:' ) , - - - $this - -> - y + + + 'value' + + => + + $putOrderId + , + + + + ) , + + + + 'fontSize' - $this - -> - encoding + => + + $fontSize + , - - + + + 'bold' + + => + + $bold + , + + + ) ; + + + } + + + + + // Customer Number + + if + + ( $this -> - Ln + _showCustomerNumber + ( + $order + -> + getStore ( ) - ; + ) + ) + + { - - $numberOfLines - ++ + + $customerNumber + + = + + $this + -> + _getGuestorderCustomerNo + ( + $order + -> + getStore + ( + ) + ) ; - - - - // Order Number - - - - $putOrderId + + + $customerNumberFieldName = + + + + Mage + :: + getStoreConfig + ( + 'sales_pdf/invoice/customer_number_field' + , - $this + $order -> - _putOrderId + getStoreId ( - $order + ) ) ; - - + + if ( - $putOrderId + $customerNumberFieldName + + + + === + + FireGento_Pdf_Model_System_Config_Source_Customer_Number + :: + CUSTOMER_NUMBER_FIELD_INCREMENT_ID ) { - - $page - -> - drawText - ( + + try + + { - + + $customer + + = + Mage :: - helper + getModel ( - 'firegento_pdf' + 'customer/customer' ) -> - __ + load ( - 'Order number:' + $order + -> + getData + ( + 'customer_id' ) - , + ) + ; - - ( - $this - -> - margin - [ - 'right' - ] + + $customerNumber - - + = - $labelRightOffset + $customer + -> + getData + ( + $customerNumberFieldName ) - , + ; - $this - -> - y - , + } - $this - -> - encoding + catch + + ( + \ + Exception + + $e + ) + + { - + + Mage + :: + logException + ( + $e ) ; - - $page - -> - drawText - ( + + //Use default - - $putOrderId - , - - ( - $this - -> - margin - [ - 'right' - ] - - - - - $valueRightOffset - - - - + $customerNumber - $this + = + + $order -> - widthForStringUsingFontSize + getCustomerId ( + ) + ; + + + + } - - $putOrderId - , + + } - $font - , + else - 10 + { - - ) - ) - , - - $this - -> - y - , - - $this - -> - encoding + + //Use default 'entity_id' - - ) - ; - - - - $this + + $customerNumber + + = + + $order -> - Ln + getCustomerId ( ) ; - + - $numberOfLines - ++ - ; - - - } - - - - // Customer Number - - - - if - - ( - $this - -> - _showCustomerNumber - ( - $order - -> - getStore - ( - ) - ) - ) - - { - - - - $page - -> - drawText - ( - - - - Mage - :: - helper - ( - 'firegento_pdf' - ) - -> - __ - ( - 'Customer number:' - ) - , - - - - ( - $this - -> - margin - [ - 'right' - ] - - - - - $labelRightOffset - ) - , - - - - $this - -> - y - , - - $this - -> - encoding - - - - ) - ; - - - - $numberOfLines - ++ - ; - - - - + + + if ( @@ -4301,20 +4455,17 @@ ( ) - != + !== '' ) { - - + $prefix - - - + = Mage @@ -4325,8 +4476,8 @@ ) ; - - + + if @@ -4340,9 +4491,9 @@ { - + - $customerid + $customerId = @@ -4350,14 +4501,10 @@ . - $order - -> - getCustomerId - ( - ) + $customerNumber ; - + } @@ -4365,200 +4512,326 @@ { - + - $customerid + $customerId = - $order - -> - getCustomerId - ( - ) + $customerNumber ; - + } - - - - $page - -> - drawText - ( + + + } - - - $customerid - , + + + + if ( + $customerId + + !== + + '' + ) + + { + + + $this -> - margin + _headerLines [ - 'right' ] - - + = - $valueRightOffset + array + ( - + + + 'content' + + => + + array + ( + + - - + 'label' - $this + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) -> - widthForStringUsingFontSize + __ ( - - - - $customerid + 'Customer number:' + ) , + + + + 'value' - $font - , + => - 10 + $customerId + , - - - ) + + ) , + + + + 'fontSize' - $this - -> - y + => + + $fontSize , + + + + 'bold' + + => - $this - -> - encoding + $bold + , - + ) ; - - + + + } + + + + } + + + + + /** print VAT ID */ + + + + if + + ( $this -> - Ln + _showCustomerVATNumber + ( + $order + -> + getStore ( ) - ; - - - - $numberOfLines - ++ - ; + ) + ) + + { - + - } + if - else + ( + $order + -> + getBillingAddress + ( + ) + -> + getVatId + ( + ) + ) { - + - $page + $customerVatId + + = + + $order -> - drawText + getBillingAddress + ( + ) + -> + getVatId ( + ) + ; - - - '-' - , + + + } + + elseif + + ( + $order + -> + getCustomerTaxvat + ( + ) + ) + + { - - + + + $customerVatId + + = + + $order + -> + getCustomerTaxvat ( + ) + ; + + + + } + + else + + { + + + + $customerVatId + + = + + '-' + ; + + + + } + + + + $this -> - margin + _headerLines [ - 'right' ] - - + = - $valueRightOffset + array + ( - - - - + + + 'content' + + => - $this - -> - widthForStringUsingFontSize + array ( - '-' - , + + + + 'label' - $font - , + => - 10 + Mage + :: + helper + ( + 'firegento_pdf' ) + -> + __ + ( + 'VAT-ID:' ) , - $this - -> - y - , + 'value' - $this - -> - encoding + => + + $customerVatId + , ) - ; + , - $this - -> - Ln - ( - ) - ; + 'fontSize' + + => + + $fontSize + , - $numberOfLines - ++ - ; + 'bold' + + => + + $bold + , - } + ) + ; } - - + - // Customer IP + /** end VAT ID print*/ + + + // Customer IP + + if @@ -4570,31 +4843,59 @@ ( 'sales/general/hide_customer_ip' , - - - + $order -> getStoreId ( ) ) - - - ) { + + + $customerIp + + = + + $order + -> + getData + ( + 'remote_ip' + ) + ; + - $page + $this -> - drawText + _headerLines + [ + ] + + = + + array ( + 'content' + + => + + array + ( + + + + 'label' + + => + Mage :: helper @@ -4608,161 +4909,76 @@ ) , - - - ( - $this - -> - margin - [ - 'right' - ] + + + 'value' - - + => - $labelRightOffset - ) - , - - - - $this - -> - y + $customerIp , - - $this - -> - encoding - + ) - ; + , - - $customerIP + + 'fontSize' - = + => - $order - -> - getData - ( - 'remote_ip' - ) - ; + $fontSize + , - - $font - - = + + 'bold' + + => - $this - -> - _setFontRegular - ( - $page + $bold , - - 10 - ) - ; - $page - -> - drawText - ( + ) + ; - - $customerIP - , - - ( + + } + + + + $this -> - margin + _headerLines [ - 'right' ] - - - - $valueRightOffset - - - - - + = - $this - -> - widthForStringUsingFontSize + array ( - - - $customerIP - , - - $font - , - - 10 - - - ) - ) - , - - $this - -> - y - , - - $this - -> - encoding - - - - ) - ; - - - - $this - -> - Ln - ( - ) - ; - - - $numberOfLines - ++ - ; - - - - } - - - - - $page - -> - drawText + 'content' + + => + + array ( - - + + + 'label' + + => + Mage :: helper @@ -4779,56 +4995,24 @@ 'invoice' ) - - - + ? 'Invoice date:' - + + + : 'Date:' ) , - - - ( - $this - -> - margin - [ - 'right' - ] - - - - - $labelRightOffset - ) - , - - $this - -> - y - , - - - - $this - -> - encoding - - - - ) - ; - - - - $documentDate + + + 'value' - = + => Mage :: @@ -4836,9 +5020,6 @@ ( 'core' ) - - - -> formatDate ( @@ -4854,91 +5035,71 @@ false ) - ; - - - - $page - -> - drawText - ( + , - + - $documentDate + ) , - + - ( - $this - -> - margin - [ - 'right' - ] - - - - - $valueRightOffset - - - - - - - $this - -> - widthForStringUsingFontSize - ( - $documentDate - , + 'fontSize' - $font - , + => - 10 - ) - ) + $fontSize , - + - $this - -> - y - , + 'bold' + + => - $this - -> - encoding + $bold + , - + ) ; - + + - $this - -> - Ln - ( - ) - ; + // Payment method. - + - $numberOfLines - ++ + $posHeader + + = + + FireGento_Pdf_Model_System_Config_Source_Payment + :: + POSITION_HEADER ; - - - + - // Payment method. + $payomentInHeader + + = + + Mage + :: + getStoreConfig + ( + 'sales_pdf/invoice/payment_method_position' + ) + + === + + $posHeader + ; - + $putPaymentMethod @@ -4947,32 +5108,18 @@ ( $mode - == + === 'invoice' - - - - && - Mage - :: - getStoreConfig - ( - 'sales_pdf/invoice/payment_method_position' - ) - - - - == + && - FireGento_Pdf_Model_System_Config_Source_Payment - :: - POSITION_HEADER + $payomentInHeader ) ; - + + if @@ -4982,73 +5129,76 @@ { - + - $page - -> - drawText - ( + $font + + = + + $bold + + ? - + - Mage - :: - helper - ( - 'firegento_pdf' - ) + $this -> - __ + _setFontRegular ( - 'Payment method:' - ) + $page , - - - - ( - $this - -> - margin - [ - 'right' - ] - - + $fontSize - $labelRightOffset - ) - , - - + ? + + $fontSize + + : + + $this + -> + defaultFontSize + ) + + + : + $this -> - y + _setFontBold + ( + $page , + $fontSize + + ? + + $fontSize + + : + $this -> - encoding - - - + defaultFontSize ) ; - + + $paymentMethodArray = - + + + $this -> _prepareText ( - - - $order -> getPayment @@ -5066,89 +5216,105 @@ $page , - - - + $font , - - 10 + + + + $this + -> + defaultFontSize , $width - - - ) ; - + + - $page + $this -> - drawText + _headerLines + [ + ] + + = + + array ( - + + 'content' + + => + + array + ( + + + + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Payment method:' + ) + , + + + + 'value' + + => + array_shift ( $paymentMethodArray ) , - + - ( - $this - -> - margin - [ - 'right' - ] - - - - - $valueRightOffset - - - - - $width ) , + + + + 'fontSize' - $this - -> - y + => + + $fontSize , - + - $this - -> - encoding - - - - ) - ; + 'bold' + + => + + $bold + , - + - $this - -> - Ln - ( ) ; - - - $numberOfLines - ++ - ; - - + + $paymentMethodArray @@ -5160,11 +5326,9 @@ ( implode ( - " " + ' ' , - - - + $paymentMethodArray ) , @@ -5174,8 +5338,12 @@ $font , - - 10 + + + + $this + -> + defaultFontSize , 2 @@ -5186,7 +5354,7 @@ ) ; - + foreach @@ -5200,90 +5368,94 @@ { - + - $page - -> - drawText - ( - $methodString - , - - - $this -> - margin + _headerLines [ - 'right' ] - - + = - $labelRightOffset - , + array + ( + + + + 'content' + + => - $this - -> - y + array + ( + + + + 'label' + + => + + $methodString , - + - $this - -> - encoding ) - ; + , - - - $this - -> - Ln - ( - ) - ; + + + 'fontSize' + + => + + $fontSize + , - + + + 'bold' + + => + + $bold + , + + - $numberOfLines - ++ + ) ; - + } - - + } - - + + // Shipping method. - + - $putShippingMethod - + $invoiceAndShippingHeader + = - ( $mode == 'invoice' - + && - - - + Mage :: getStoreConfig @@ -5291,17 +5463,20 @@ 'sales_pdf/invoice/shipping_method_position' ) - + - == + === FireGento_Pdf_Model_System_Config_Source_Shipping :: POSITION_HEADER + ; - - - || + + + $shipmentAndShippingHeader + + = $mode @@ -5309,12 +5484,10 @@ 'shipment' - + && - - - + Mage :: getStoreConfig @@ -5322,86 +5495,100 @@ 'sales_pdf/shipment/shipping_method_position' ) - + - == + === FireGento_Pdf_Model_System_Config_Source_Shipping :: POSITION_HEADER - ) ; - + if ( - $putShippingMethod + ( + $invoiceAndShippingHeader + + || + + $shipmentAndShippingHeader ) - { - - - - $page + && + + $order -> - drawText - ( - - - - Mage - :: - helper + getIsNotVirtual ( - 'firegento_pdf' ) - -> - __ - ( - 'Shipping method:' ) - , + + { - + + + $font + + = + + $bold + + ? + + - ( $this -> - margin - [ - 'right' - ] + _setFontRegular + ( + $page + , - - + $fontSize + + ? + + $fontSize + + : - $labelRightOffset + $this + -> + defaultFontSize ) - , - + + : + $this -> - y + _setFontBold + ( + $page , + $fontSize + + ? + + $fontSize + + : + $this -> - encoding - - - + defaultFontSize ) ; - + $shippingMethodArray - - - + = $this @@ -5417,98 +5604,182 @@ $page , - - - + $font , - - 10 + + + + $this + -> + defaultFontSize , $width ) ; - + - $page - -> - drawText - ( - - - + $shippingMethod + + = + array_shift ( $shippingMethodArray ) - , + ; - - - ( + + $this -> - margin + _headerLines [ - 'right' ] - - + = - $valueRightOffset + array + ( + + + + 'content' + + => - - + array + ( + + + + 'label' - $width + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Shipping method:' + ) + , + + + + 'value' + + => + + $shippingMethod + , + + + ) , + + + + 'fontSize' - $this - -> - y + => + + $fontSize , - + - $this - -> - encoding + 'bold' + + => + + $bold + , - + ) ; - + + + $font + + = + + $bold + + ? + + + $this -> - Ln + _setFontRegular ( + $page + , + + $fontSize + + ? + + $fontSize + + : + + $this + -> + defaultFontSize ) - ; - - - $numberOfLines - ++ + + + : + + $this + -> + _setFontBold + ( + $page + , + + $fontSize + + ? + + $fontSize + + : + + $this + -> + defaultFontSize + ) ; - + + $shippingMethodArray = - + + + $this -> _prepareText ( - - - implode ( " " @@ -5524,21 +5795,22 @@ $font , - 10 + $this + -> + defaultFontSize , - + + + 2 * $width - - - ) ; - + foreach @@ -5552,126 +5824,774 @@ { - + - $page + $this -> - drawText + _headerLines + [ + ] + + = + + array + ( + + + + 'content' + + => + + array ( + + + + 'label' + + => + $methodString , - + - $this - -> - margin - [ - 'right' - ] + ) + , + + + + 'fontSize' - - + => - $labelRightOffset + $fontSize , + + + + 'bold' + + => - $this - -> - y + $bold , - - + + + ) + ; + + + + } + + + + } + + + + + $transportObject + + = + + new + + Varien_Object + ( + ) + ; + + + + $transportObject + -> + setData + ( + array + ( + 'lines' + + => + $this -> - encoding + headerLines + ) ) ; + + + Mage + :: + dispatchEvent + ( + - + + 'firegento_pdf_header_lines' + , + + + + array + ( + 'headerLines' + + => + + $transportObject + ) + + + + ) + ; + + + + Mage + :: + dispatchEvent + ( + + + + 'firegento_pdf_' + + . + $this -> - Ln + getMode + ( + ) + + . + + '_header_lines' + , + + + + array ( + 'headerLines' + + => + + $transportObject + ) + + + ) ; - - - $numberOfLines - ++ + + + $this + -> + headerLines + + = + + $transportObject + -> + getData + ( + 'lines' + ) ; - + + + $helper - } + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + ; - - + - } + foreach + + ( + $this + -> + _headerLines + + as + + $line + ) + + { - - + + + $font + + = + + $this + -> + setFont + ( + $line + , + + $page + ) + ; + + + + foreach + + ( + $line + [ + 'content' + ] + + as + + $key + + => + + $c + ) + + { + + + + if + + ( + $key + + === + + 'label' + ) + + { + + + + $page + -> + setFillColor + ( + $helper + -> + getLabelColor + ( + ) + ) + ; + + + + $offset + + = + + ( + $this + -> + margin + [ + 'right' + ] + + - + + 180 + + - + + $this + -> + getHeaderblockOffset + ( + ) + ) + ; + + + + } + + else + + { + + + + $page + -> + setFillColor + ( + $helper + -> + getTextColor + ( + ) + ) + ; + + + + $offset + + = + + $this + -> + margin + [ + 'right' + ] + + - + + 10 + + - + + $this + -> + getHeaderblockOffset + ( + ) + + + + - + + $this + -> + widthForStringUsingFontSize + ( + $c + , + + $font + , + + 10 + ) + ; + + + + } + + + + + $page + -> + drawText + ( + + + + $c + , + + + + $offset + , + + + + $this + -> + y + , + + + + $this + -> + encoding + + + + ) + ; + + + + } + + + + $this + -> + Ln + ( + ) + ; + + + + } + + + + $this + -> + y + + -= + + ( + count + ( + $this + -> + _headerLines + ) + + * + + 2 + ) + ; + + + + } + + + + + /** + + + * @param array $line + + + * @param™ Zend_Pdf_Page $page + + + * @return Zend_Pdf_Resource_Font + + + */ + + + + protected + + function + + setFont + ( + array + + $line + , + + Zend_Pdf_Page + + $page + ) + + + + { + + + + if + + ( + $line + [ + 'fontSize' + ] + + === + + null + ) + + { + + + + $line + [ + 'fontSize' + ] + + = + + $this + -> + defaultFontSize + ; + + + + } + + + + $font + + = + + $this + -> + _setFontRegular + ( + $page + , + + $line + [ + 'fontSize' + ] + ) + ; + + + + if + + ( + $line + [ + 'bold' + ] + ) + + { + + + + $font + + = + + $this + -> + _setFontBold + ( + $page + , + + $line + [ + 'fontSize' + ] + ) + ; + + + + } + + + + return + + $font + ; + + + + } + + + + + /** + + + * Return the order id or false if order id should not be displayed on document. + + + * + + + * @param Mage_Sales_Model_Order $order order to get id from + + + * + + + * @return int|false + + + */ + + + + protected + + function + + _putOrderId + ( + $order + ) + + + + { + + + + return + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + putOrderId + ( + $order + , + + $this + -> + mode + ) + ; + + + + } + + + + + /** + + + * do we show the customber number on this document + + + * + + + * @param mixed $store store from whom we need the config setting + + + * + + + * @return bool + + + */ + + + + protected + + function + + _showCustomerNumber + ( + $store + ) + + + + { + + + + return + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + showCustomerNumber + ( $this -> - y - - -= - - ( - $numberOfLines - - * + mode + , - 2 + $store ) ; - + } - - + + /** - - * Return the order id or false if order id should not be displayed on document. + + * do we show the customber VAT number on this document - + * - - * @param Mage_Sales_Model_Order $order order to get id from + + * @param mixed $store store from whom we need the config setting - + * - - * @return int|false + + * @return bool - + */ - + protected function - _putOrderId + _showCustomerVATNumber ( - $order + $store ) - + { - + return @@ -5681,61 +6601,64 @@ ( 'firegento_pdf' ) + + + -> - putOrderId + showCustomerVATNumber ( - $order - , - $this -> mode + , + + $store ) ; - + } - - + + /** - - * do we show the customber number on this document + + * which customer number should be displayed for guest orders - + * - + * @param mixed $store store from whom we need the config setting - + * - - * @return bool + + * @return string - + */ - + protected function - _showCustomerNumber + _getGuestorderCustomerNo ( $store ) - + { - + return @@ -5746,10 +6669,10 @@ 'firegento_pdf' ) - + -> - showCustomerNumber + getGuestorderCustomerNo ( $this -> @@ -5760,34 +6683,34 @@ ) ; - + } - - + + /** - + * Generate new PDF page. - + * - + * @param array $settings Page settings - + * - + * @return Zend_Pdf_Page - + */ - + public @@ -5806,11 +6729,11 @@ ) ) - + { - + $pdf @@ -5823,8 +6746,8 @@ ) ; - - + + $page @@ -5834,13 +6757,15 @@ -> newPage ( - Zend_Pdf_Page - :: - SIZE_A4 + $this + -> + getPageSize + ( + ) ) ; - + $this -> @@ -5848,7 +6773,7 @@ ++ ; - + $pdf -> @@ -5861,8 +6786,8 @@ $page ; - - + + $this -> @@ -5883,19 +6808,37 @@ ) ; - - + + + + // set the font because it may not be set, see https://github.com/firegento/firegento-pdf/issues/184 + + + + $this + -> + _setFontRegular + ( + $page + , + + 9 + ) + ; + + + // provide the possibility to add random stuff to the page - + Mage :: dispatchEvent ( - + 'firegento_pdf_' @@ -5912,7 +6855,7 @@ '_edit_page' , - + array ( @@ -5934,13 +6877,13 @@ ) ) - + ) ; - - + + $this -> @@ -5951,7 +6894,7 @@ 800 ; - + $this -> @@ -5964,51 +6907,51 @@ ) ; - - + + return $page ; - + } - - + + /** - + * Draw - + * - + * @param Varien_Object $item creditmemo/shipping/invoice to draw - + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param Mage_Sales_Model_Order $order order to get infos from - + * @param int $position position in table - + * - + * @return Zend_Pdf_Page - + */ - + protected @@ -6017,28 +6960,28 @@ _drawItem ( - + Varien_Object $item , - + Zend_Pdf_Page $page , - + Mage_Sales_Model_Order $order , - + $position @@ -6046,13 +6989,13 @@ 1 - + ) { - + $type @@ -6069,8 +7012,8 @@ ) ; - - + + $renderer @@ -6084,7 +7027,7 @@ ) ; - + $renderer -> @@ -6094,7 +7037,7 @@ ) ; - + $renderer -> @@ -6104,7 +7047,7 @@ ) ; - + $renderer -> @@ -6114,7 +7057,7 @@ ) ; - + $renderer -> @@ -6124,7 +7067,7 @@ ) ; - + $renderer -> @@ -6134,8 +7077,8 @@ ) ; - - + + $renderer -> @@ -6145,7 +7088,8 @@ ) ; - + + return @@ -6156,37 +7100,37 @@ ) ; - + } - - + + /** - + * Insert Totals Block - + * - + * @param object $page Current page object of Zend_Pdf - + * @param object $source Fields of footer - + * - + * @return Zend_Pdf_Page - + */ - + protected @@ -6200,11 +7144,11 @@ $source ) - + { - + $this -> @@ -6215,8 +7159,8 @@ 15 ; - - + + $order @@ -6229,26 +7173,26 @@ ) ; - - + + $totalTax - + = 0 ; - + $shippingTaxRate - + = 0 ; - + $shippingTaxAmount @@ -6261,8 +7205,8 @@ ) ; - - + + if @@ -6276,11 +7220,11 @@ { - + $shippingTaxRate - + = @@ -6294,7 +7238,7 @@ 100 - + / @@ -6305,7 +7249,7 @@ ( ) - + - @@ -6317,12 +7261,12 @@ ) ; - + } - - + + $groupedTax @@ -6333,8 +7277,8 @@ ) ; - - + + $items [ @@ -6348,7 +7292,7 @@ ) ; - + foreach @@ -6366,7 +7310,7 @@ { - + if @@ -6384,16 +7328,16 @@ { - + continue ; - + } - + $items [ @@ -6415,17 +7359,17 @@ ) ; - + } - - + + array_push ( - + $items [ @@ -6436,7 +7380,7 @@ array ( - + 'row_invoiced' @@ -6449,7 +7393,7 @@ ) , - + 'tax_inc_subtotal' @@ -6458,7 +7402,7 @@ false , - + 'tax_percent' @@ -6467,25 +7411,26 @@ $shippingTaxRate , - + 'tax_amount' => $shippingTaxAmount + , - + ) - + ) ; - - + + foreach @@ -6502,7 +7447,7 @@ { - + $_percent @@ -6511,7 +7456,7 @@ null ; - + if @@ -6528,7 +7473,7 @@ { - + $item [ @@ -6540,11 +7485,11 @@ 0 ; - + } - + if @@ -6561,7 +7506,7 @@ { - + $item [ @@ -6573,11 +7518,11 @@ 0 ; - + } - + if @@ -6594,7 +7539,7 @@ { - + $item [ @@ -6606,11 +7551,11 @@ 0 ; - + } - + if @@ -6627,7 +7572,7 @@ { - + $item [ @@ -6639,11 +7584,11 @@ 0 ; - + } - + if @@ -6660,7 +7605,7 @@ 0 ) - + && @@ -6676,13 +7621,13 @@ 0 ) - + ) { - + $_percent @@ -6700,11 +7645,11 @@ ) ; - + } - + if @@ -6718,7 +7663,7 @@ $item ) - + || @@ -6727,13 +7672,13 @@ 'tax_inc_subtotal' ] - + ) { - + $totalTax @@ -6745,11 +7690,11 @@ ] ; - + } - + if @@ -6768,7 +7713,7 @@ { - + if @@ -6786,7 +7731,7 @@ { - + $groupedTax [ @@ -6801,7 +7746,7 @@ ] ; - + } @@ -6809,7 +7754,7 @@ { - + $groupedTax [ @@ -6824,20 +7769,20 @@ ] ; - + } - + } - + } - - + + $totals @@ -6851,8 +7796,8 @@ ) ; - - + + $lineBlock @@ -6861,7 +7806,7 @@ array ( - + 'lines' @@ -6872,21 +7817,22 @@ ) , - + 'height' => 20 + , - + ) ; - - + + foreach @@ -6900,7 +7846,7 @@ { - + $total -> @@ -6915,8 +7861,8 @@ ) ; - - + + if @@ -6930,25 +7876,27 @@ { - + $total -> setFontSize ( - 10 + $this + -> + defaultFontSize ) ; - + // fix Magento 1.8 bug, so that taxes for shipping do not appear twice - + // see https://github.com/firegento/firegento-pdf/issues/106 - + $uniqueTotalsForDisplay @@ -6957,7 +7905,7 @@ array_map ( - + 'unserialize' , @@ -6969,7 +7917,7 @@ 'serialize' , - + $total -> @@ -6979,12 +7927,12 @@ ) ) - + ) ; - + foreach @@ -6998,10 +7946,10 @@ { - + $label - + = $this @@ -7015,7 +7963,7 @@ ) ; - + $lineBlock [ @@ -7029,12 +7977,12 @@ array ( - + array ( - + 'text' @@ -7043,16 +7991,25 @@ $label , - + 'feed' => - 470 + $this + -> + margin + [ + 'right' + ] + + - + + 70 , - + 'align' @@ -7061,7 +8018,7 @@ 'right' , - + 'font_size' @@ -7071,18 +8028,19 @@ [ 'font_size' ] + , - + ) , - + array ( - + 'text' @@ -7094,16 +8052,21 @@ ] , - + 'feed' => - 540 + $this + -> + margin + [ + 'right' + ] , - + 'align' @@ -7112,7 +8075,7 @@ 'right' , - + 'font_size' @@ -7122,30 +8085,31 @@ [ 'font_size' ] + , - + ) , - + ) ; - + } - + } - + } - + $page @@ -7165,47 +8129,49 @@ ) ; - + + return $page ; - + } - - + + + /** - + * Insert Notes - + * - - * @param Zend_Pdf_Page $page Current Page Object of Zend_PDF + + * @param Zend_Pdf_Page $page Current Page Object of Zend_PDF - - * @param Mage_Sales_Model_Order &$order order to get note from + + * @param Mage_Sales_Model_Order $order order to get note from - - * @param Mage_Sales_Model_Abstract &$model invoice/shipment/creditmemo + + * @param Mage_Sales_Model_Abstract $model invoice/shipment/creditmemo - + * - + * @return \Zend_Pdf_Page - + */ - + protected @@ -7216,31 +8182,31 @@ $page , - & $order , - & $model ) - + { - + $fontSize = - 10 + $this + -> + defaultFontSize ; - + $font - + = $this @@ -7254,28 +8220,22 @@ ) ; - + $this -> y - - = - - $this - -> - y - - - + + -= 60 ; - - + + $notes - + = array @@ -7283,7 +8243,7 @@ ) ; - + $result @@ -7296,7 +8256,7 @@ ) ; - + $result -> @@ -7306,14 +8266,14 @@ ) ; - + Mage :: dispatchEvent ( - + 'firegento_pdf_' @@ -7330,12 +8290,12 @@ '_insert_note' , - + array ( - + 'order' @@ -7344,7 +8304,7 @@ $order , - + $this -> @@ -7357,24 +8317,25 @@ $model , - + 'result' => $result + , - + ) - + ) ; - + $notes @@ -7393,12 +8354,12 @@ ) ; - - + + // Get free text notes. - + $note @@ -7424,7 +8385,7 @@ ) ; - + if @@ -7438,7 +8399,7 @@ { - + $tmpNotes @@ -7453,10 +8414,10 @@ ) ; - + $notes - + = array_merge @@ -7468,16 +8429,16 @@ ) ; - + } - - + + // Draw notes on PDF. - + foreach @@ -7491,11 +8452,11 @@ { - + // prepare the text so that it fits to the paper - + foreach @@ -7513,7 +8474,9 @@ $font , - 10 + $this + -> + defaultFontSize ) as @@ -7523,11 +8486,11 @@ { - + // create a new page if necessary - + if @@ -7540,7 +8503,7 @@ 50 - + || @@ -7551,14 +8514,12 @@ ( 'sales_pdf/firegento_pdf/show_footer' ) - - - + == 1 - + && @@ -7571,16 +8532,16 @@ 100 ) - + ) { - + $page - + = $this @@ -7593,7 +8554,7 @@ ) ; - + $this -> @@ -7610,10 +8571,10 @@ 60 ; - + $font - + = $this @@ -7627,11 +8588,11 @@ ) ; - + } - + $page -> @@ -7656,65 +8617,64 @@ 30 , - - - + $this -> encoding ) ; - + $this -> Ln ( - 15 ) ; - + } - + } - + + return $page ; - + } - - + + + /** - + * draw footer on pdf - + * - - * @param Zend_Pdf_Page &$page page to draw on + + * @param Zend_Pdf_Page $page page to draw on - + * @param mixed $store store to get infos from - + */ - + protected @@ -7722,7 +8682,6 @@ _addFooter ( - & $page , @@ -7733,15 +8692,15 @@ null ) - + { - + // get the imprint of the store if a store is set - + if @@ -7755,7 +8714,7 @@ { - + $imprintObject @@ -7768,7 +8727,7 @@ ) ; - + $imprintObject -> @@ -7781,14 +8740,14 @@ 'general/imprint' , - + $store ) ) ; - + Mage :: @@ -7800,24 +8759,25 @@ array ( - + 'transport_object' => $imprintObject + , - + ) - + ) ; - + $this -> @@ -7832,16 +8792,16 @@ ) ; - + } - - + + // Add footer if GermanSetup is installed. - + if @@ -7850,7 +8810,7 @@ -> _imprint - + && @@ -7865,13 +8825,13 @@ 1 - + ) { - + $this -> @@ -7882,7 +8842,7 @@ 110 ; - + $this -> @@ -7892,12 +8852,12 @@ ) ; - - + + // Add page counter. - + $this -> @@ -7908,7 +8868,7 @@ 110 ; - + $this -> @@ -7918,38 +8878,38 @@ ) ; - + } - + } - - + + /** - + * Insert footer - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * - + * @return void - + */ - + protected @@ -7957,15 +8917,14 @@ _insertFooter ( - & $page ) - + { - + $page -> @@ -7975,12 +8934,27 @@ -> colors [ - 'black' + 'footer' ] ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'footer' + ] + ) + ; + + $page -> @@ -7990,7 +8964,7 @@ ) ; - + $page -> @@ -8017,7 +8991,7 @@ 5 , - + $this -> @@ -8041,8 +9015,8 @@ ) ; - - + + $this -> @@ -8052,7 +9026,7 @@ ) ; - + $this -> @@ -8062,8 +9036,8 @@ ) ; - - + + $fields @@ -8072,7 +9046,7 @@ array ( - + 'telephone' @@ -8091,7 +9065,7 @@ ) , - + 'fax' @@ -8110,7 +9084,7 @@ ) , - + 'email' @@ -8129,7 +9103,7 @@ ) , - + 'web' @@ -8146,13 +9120,14 @@ ( 'Web:' ) + , - + ) ; - + $this -> @@ -8174,8 +9149,8 @@ ) ; - - + + $fields @@ -8184,7 +9159,7 @@ array ( - + 'bank_name' @@ -8196,9 +9171,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8206,7 +9178,7 @@ ) , - + 'bank_account' @@ -8218,9 +9190,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8228,7 +9197,7 @@ ) , - + 'bank_code_number' @@ -8240,9 +9209,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8250,7 +9216,7 @@ ) , - + 'bank_account_owner' @@ -8262,9 +9228,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8272,7 +9235,7 @@ ) , - + 'swift' @@ -8291,7 +9254,7 @@ ) , - + 'iban' @@ -8308,13 +9271,14 @@ ( 'IBAN:' ) + , - + ) ; - + $this -> @@ -8336,8 +9300,8 @@ ) ; - - + + $fields @@ -8346,7 +9310,7 @@ array ( - + 'tax_number' @@ -8358,9 +9322,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8368,7 +9329,7 @@ ) , - + 'vat_id' @@ -8387,7 +9348,7 @@ ) , - + 'register_number' @@ -8399,9 +9360,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8409,7 +9367,7 @@ ) , - + 'ceo' @@ -8428,7 +9386,7 @@ ) , - + 'city' @@ -8440,9 +9398,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8450,7 +9405,7 @@ ) , - + 'court' @@ -8462,9 +9417,6 @@ ( 'firegento_pdf' ) - - - -> __ ( @@ -8472,12 +9424,12 @@ ) , - + ) ; - + $this -> @@ -8489,14 +9441,12 @@ $fields , - 355 + 365 , 60 , - - - + $this -> margin @@ -8506,7 +9456,7 @@ - - 365 + 375 - @@ -8514,49 +9464,80 @@ ) ; - + + + + $page + -> + setLineColor + ( + $this + -> + colors + [ + 'black' + ] + ) + ; + + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'text' + ] + ) + ; + + } - - + + /** - + * Insert footer block - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param array $fields Fields of footer - + * @param int $colposition Starting colposition - + * @param int $valadjust Margin between label and value - + * @param int $colwidth the width of this footer block - text will be wrapped if it is broader - + * than this width - + * - + * @return void - + */ - + protected @@ -8565,18 +9546,17 @@ _insertFooterBlock ( - + - & $page , - + $fields , - + $colposition @@ -8585,7 +9565,7 @@ 0 , - + $valadjust @@ -8594,7 +9574,7 @@ 30 , - + $colwidth @@ -8602,13 +9582,13 @@ null - + ) { - + $fontSize @@ -8617,10 +9597,10 @@ 7 ; - + $font - + = $this @@ -8634,10 +9614,10 @@ ) ; - + $y - + = $this @@ -8645,8 +9625,8 @@ y ; - - + + $valposition @@ -8659,8 +9639,8 @@ $valadjust ; - - + + if @@ -8673,7 +9653,7 @@ { - + foreach @@ -8691,7 +9671,7 @@ { - + if @@ -8709,20 +9689,20 @@ { - + continue ; - + } - + // draw the label - + $page -> @@ -8742,9 +9722,7 @@ $colposition , - - - + $y , @@ -8754,14 +9732,14 @@ ) ; - + // prepare the value: wrap it if necessary - + $val - + = $this @@ -8772,7 +9750,7 @@ ] ; - + $width @@ -8781,7 +9759,7 @@ $colwidth ; - + if @@ -8795,11 +9773,11 @@ { - + // calculate the maximum width for the value - + $width @@ -8819,9 +9797,7 @@ + $colwidth - - - + - ( @@ -8838,18 +9814,15 @@ ) ; - + } - + foreach ( - - - $this -> _prepareText @@ -8868,20 +9841,15 @@ $width ) - - - + as $tmpVal - - - ) { - + $page -> @@ -8889,9 +9857,7 @@ ( $tmpVal , - - - + $this -> margin @@ -8906,16 +9872,14 @@ $y , - - - + $this -> encoding ) ; - + $y @@ -8924,49 +9888,49 @@ 12 ; - + } - + } - + } - + } - - + + /** - + * Insert address of store owner - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * @param mixed $store store to get info from - + * - + * @return void - + */ - + protected @@ -8974,7 +9938,6 @@ _insertFooterAddress ( - & $page , @@ -8985,11 +9948,11 @@ null ) - + { - + $fontSize @@ -8998,10 +9961,10 @@ 7 ; - + $font - + = $this @@ -9015,10 +9978,10 @@ ) ; - + $y - + = $this @@ -9026,24 +9989,21 @@ y ; - + $address - + = '' ; - - + + foreach ( - - - $this -> _prepareText @@ -9061,9 +10021,7 @@ $font , - - - + $fontSize , @@ -9072,33 +10030,30 @@ as - $companyFirst - - - + $company1st ) { - + $address .= - $companyFirst + $company1st . "\n" ; - + } - - + + if @@ -9116,14 +10071,11 @@ { - + foreach ( - - - $this -> _prepareText @@ -9138,9 +10090,7 @@ $page , - - - + $font , @@ -9152,37 +10102,36 @@ as - $companySecond + $company2nd + ) - + - ) - { - + $address .= - $companySecond + $company2nd . "\n" ; - + } - + } - - + + if @@ -9200,7 +10149,7 @@ { - + $address @@ -9218,11 +10167,11 @@ "\n" ; - + } - + if @@ -9240,7 +10189,7 @@ { - + $address @@ -9258,11 +10207,11 @@ " " ; - + } - + if @@ -9280,7 +10229,7 @@ { - + $address @@ -9298,12 +10247,12 @@ "\n" ; - + } - - + + if @@ -9322,7 +10271,7 @@ { - + $countryName @@ -9334,9 +10283,6 @@ ( 'directory/country' ) - - - -> loadByCode ( @@ -9353,10 +10299,10 @@ ) ; - + $address - + .= Mage @@ -9372,12 +10318,12 @@ ) ; - + } - - + + foreach @@ -9397,7 +10343,7 @@ { - + if @@ -9411,7 +10357,7 @@ { - + $page -> @@ -9425,9 +10371,7 @@ ) ) , - - - + $this -> margin @@ -9449,7 +10393,7 @@ ) ; - + $y @@ -9458,42 +10402,43 @@ 12 ; - + } - + } - + } - - + + + /** - + * Insert page counter - + * - - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf - + * - + * @return void - + */ - + protected @@ -9501,15 +10446,14 @@ _insertPageCounter ( - & $page ) - + { - + $font @@ -9526,14 +10470,29 @@ ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'labels' + ] + ) + ; + + $page -> drawText ( - + Mage :: @@ -9550,9 +10509,7 @@ . ' ' - - - + . $this @@ -9560,7 +10517,7 @@ pagecounter , - + $this -> @@ -9572,9 +10529,7 @@ - 23 - - - + - $this @@ -9593,46 +10548,61 @@ ) , - + $this -> y , - + $this -> encoding - + ) ; - + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'text' + ] + ) + ; + + } - - + + /** - + * get stanard font - + * - + * @return Zend_Pdf_Resource_Font the regular font - + */ - + public @@ -9642,11 +10612,11 @@ ( ) - + { - + if @@ -9668,7 +10638,7 @@ { - + return @@ -9684,11 +10654,12 @@ ) ; - + } - + + return @@ -9702,37 +10673,37 @@ ) ; - + } - - + + /** - + * Set default font - + * - + * @param Zend_Pdf_Page $object Current page object of Zend_Pdf - + * @param string|int $size Font size - + * - + * @return Zend_Pdf_Resource_Font - + */ - + protected @@ -9750,11 +10721,11 @@ 10 ) - + { - + $font @@ -9767,7 +10738,7 @@ ) ; - + $object -> @@ -9780,35 +10751,36 @@ ) ; - + + return $font ; - + } - - + + /** - + * get default bold font - + * - + * @return Zend_Pdf_Resource_Font the bold font - + */ - + public @@ -9818,11 +10790,11 @@ ( ) - + { - + if @@ -9844,7 +10816,7 @@ { - + return @@ -9860,11 +10832,12 @@ ) ; - + } - + + return @@ -9878,37 +10851,37 @@ ) ; - + } - - + + /** - + * Set bold font - + * - + * @param Zend_Pdf_Page $object Current page object of Zend_Pdf - + * @param string|int $size Font size - + * - + * @return Zend_Pdf_Resource_Font - + */ - + protected @@ -9926,11 +10899,11 @@ 10 ) - + { - + $font @@ -9943,7 +10916,7 @@ ) ; - + $object -> @@ -9956,35 +10929,36 @@ ) ; - + + return $font ; - + } - - + + /** - + * get italic font - + * - + * @return Zend_Pdf_Resource_Font - + */ - + public @@ -9994,11 +10968,11 @@ ( ) - + { - + if @@ -10020,7 +10994,7 @@ { - + return @@ -10036,11 +11010,12 @@ ) ; - + } - + + return @@ -10049,48 +11024,48 @@ fontWithName ( - + Zend_Pdf_Font :: FONT_HELVETICA_ITALIC - + ) ; - + } - - + + /** - + * Set italic font - + * - + * @param Zend_Pdf_Page $object Current page object of Zend_Pdf - + * @param string|int $size Font size - + * - + * @return Zend_Pdf_Resource_Font - + */ - + protected @@ -10108,11 +11083,11 @@ 10 ) - + { - + $font @@ -10125,7 +11100,7 @@ ) ; - + $object -> @@ -10138,53 +11113,54 @@ ) ; - + + return $font ; - + } - - + + /** - + * Prepares the text so that it fits to the given page's width. - + * - + * @param string $text the text which should be prepared - + * @param Zend_Pdf_Page $page the page on which the text will be rendered - + * @param Zend_Pdf_Resource_Font $font the font with which the text will be rendered - + * @param int $fontSize the font size with which the text will be rendered - + * @param int $width [optional] the width for the given text, defaults to the page width - + * - + * @return array the given text in an array where each item represents a new line - + */ - + public @@ -10211,11 +11187,11 @@ null ) - + { - + if @@ -10228,7 +11204,7 @@ { - + return @@ -10237,20 +11213,20 @@ ) ; - + } - + $lines - + = '' ; - + $currentLine @@ -10259,11 +11235,11 @@ '' ; - + // calculate the page's width with respect to the margins - + if @@ -10276,11 +11252,11 @@ { - + $width - + = @@ -10308,7 +11284,7 @@ ( ) - + - @@ -10321,26 +11297,41 @@ ) ; - + } - + + + // regular expression that splits on whitespaces and dashes based on http://stackoverflow.com/a/11758732/719023 + + $textChunks = - explode + preg_split ( - ' ' + '/([^\s-]+[\s-]+)/' , $text + , + + - + 1 + , + + PREG_SPLIT_NO_EMPTY + + | + + PREG_SPLIT_DELIM_CAPTURE ) ; - + foreach @@ -10351,10 +11342,22 @@ $textChunk ) - - { + + { + + + + $textChunk + + = + + trim + ( + $textChunk + ) + ; - + if @@ -10369,7 +11372,7 @@ ' ' - + . @@ -10386,17 +11389,17 @@ $width - + ) { - + // do not add whitespace on first line - + if @@ -10410,7 +11413,7 @@ { - + $currentLine @@ -10419,11 +11422,11 @@ ' ' ; - + } - + $currentLine @@ -10432,7 +11435,7 @@ $textChunk ; - + } @@ -10440,14 +11443,14 @@ { - + // text is too broad, so add new line character - + $lines - + .= $currentLine @@ -10457,7 +11460,7 @@ "\n" ; - + $currentLine @@ -10466,19 +11469,19 @@ $textChunk ; - + } - + } - + // append the last line - + $lines @@ -10487,7 +11490,8 @@ $currentLine ; - + + return @@ -10500,39 +11504,39 @@ ) ; - + } - - + + /** - + * Fix the percentage for taxes which come with four decimal places - + * from magento core. - + * - + * @param string $label tax label which contains the badly formatted tax percentage - + * - + * @return string - + */ - + - private + protected function @@ -10541,11 +11545,11 @@ $label ) - + { - + $pattern @@ -10554,7 +11558,7 @@ "/(.*)\((\d{1,2}\.\d{4}%)\)/" ; - + if @@ -10573,7 +11577,7 @@ { - + $percentage @@ -10584,7 +11588,7 @@ toNumber ( - + $matches [ @@ -10592,12 +11596,12 @@ ] , - + array ( - + 'locale' @@ -10618,7 +11622,7 @@ ) , - + 'precision' @@ -10627,16 +11631,17 @@ 2 , - + ) - + ) ; - + + return @@ -10658,41 +11663,42 @@ '%)' ; - + } - + + return $label ; - + } - - + + /** - + * get bold font file - + * - + * @return string - + */ - + - private + protected function @@ -10700,11 +11706,11 @@ ( ) - + { - + return @@ -10723,8 +11729,8 @@ DS - - + + . $this @@ -10734,30 +11740,30 @@ ) ; - + } - - + + /** - + * get bold font path - + * - + * @return string - + */ - + - private + protected function @@ -10765,11 +11771,11 @@ ( ) - + { - + return @@ -10778,53 +11784,53 @@ getStoreConfig ( - + FireGento_Pdf_Helper_Data :: XML_PATH_BOLD_FONT - + ) ; - + } - - + + /** - + * check whether font file exists for bold font - + * - + * @return bool - + */ - + - private + protected function - regularFontFileExists + boldFontFileExists ( ) - + { - + return @@ -10838,30 +11844,30 @@ ) ; - + } - - + + /** - + * get italic font path - + * - + * @return string - + */ - + - private + protected function @@ -10869,11 +11875,11 @@ ( ) - + { - + return @@ -10882,41 +11888,41 @@ getStoreConfig ( - + FireGento_Pdf_Helper_Data :: XML_PATH_ITALIC_FONT - + ) ; - + } - - + + /** - + * check whether italic font file exists - + * - + * @return bool - + */ - + - private + protected function @@ -10924,11 +11930,11 @@ ( ) - + { - + return @@ -10942,30 +11948,30 @@ ) ; - + } - - + + /** - + * get italic font file - + * - + * @return string - + */ - + - private + protected function @@ -10973,11 +11979,11 @@ ( ) - + { - + return @@ -10995,9 +12001,7 @@ . DS - - - + . $this @@ -11007,31 +12011,30 @@ ) ; - + } - - - + + /** - + * get the regular font path - + * - + * @return string - + */ - + - private + protected function @@ -11039,11 +12042,11 @@ ( ) - + { - + return @@ -11052,41 +12055,41 @@ getStoreConfig ( - + FireGento_Pdf_Helper_Data :: XML_PATH_REGULAR_FONT - + ) ; - + } - - + + /** - + * check whether font file exists for regular font - + * - + * @return bool - + */ - + - private + protected function @@ -11094,11 +12097,11 @@ ( ) - + { - + return @@ -11112,30 +12115,30 @@ ) ; - + } - - + + /** - + * get the path to the font file for regular font - + * - + * @return string - + */ - + - private + protected function @@ -11143,11 +12146,11 @@ ( ) - + { - + return @@ -11166,8 +12169,8 @@ DS - - + + . $this @@ -11177,12 +12180,57 @@ ) ; - + + + } + + + + + /** + + + * @return string + + + */ + + + + private + + function + + getPageSize + ( + ) + + + + { + + + + return + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + getPageSizeConfigPath + ( + ) + ; + + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xml index 91d24cf..bcb2b95 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,54 +53,36 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Creditmemo model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Engine_Creditmemo_Default @@ -109,21 +91,21 @@ FireGento_Pdf_Model_Engine_Abstract - + { - - + + /** - + * constructor to set mode to creditmemo - + */ - + public @@ -133,11 +115,11 @@ ( ) - + { - + parent :: @@ -146,7 +128,7 @@ ) ; - + $this -> @@ -156,34 +138,34 @@ ) ; - + } - - + + /** - + * Return PDF document - + * - + * @param array $creditmemos creditmemos to generate pdfs for - + * - + * @return Zend_Pdf - + */ - + public @@ -200,11 +182,32 @@ ) ) - + { - + + + $currentStore + + = + + Mage + :: + app + ( + ) + -> + getStore + ( + ) + -> + getCode + ( + ) + ; + + $this -> @@ -213,7 +216,7 @@ ) ; - + $this -> @@ -223,8 +226,8 @@ ) ; - - + + $pdf @@ -237,7 +240,7 @@ ) ; - + $this -> @@ -247,8 +250,8 @@ ) ; - - + + foreach @@ -262,11 +265,11 @@ { - + // pagecounter is 0 at the beginning, because it is incremented in newPage() - + $this -> @@ -277,7 +280,7 @@ 0 ; - + if @@ -291,7 +294,7 @@ { - + Mage :: @@ -313,7 +316,7 @@ ) ; - + Mage :: @@ -331,11 +334,12 @@ ) ; - + } - + + $order @@ -348,7 +352,7 @@ ) ; - + $this -> @@ -358,8 +362,8 @@ ) ; - - + + $page @@ -375,8 +379,8 @@ ) ; - - + + $this -> @@ -392,8 +396,8 @@ ) ; - - + + $this -> @@ -406,7 +410,7 @@ ) ; - + $this -> @@ -416,8 +420,8 @@ ) ; - - + + $this -> @@ -428,8 +432,8 @@ 20 ; - - + + $position @@ -438,8 +442,8 @@ 0 ; - - + + foreach @@ -457,7 +461,7 @@ { - + if @@ -475,26 +479,27 @@ { - + continue ; - + } - + + /* Draw item */ - + $position ++ ; - + $this -> @@ -513,7 +518,7 @@ ) ; - + $page @@ -527,16 +532,16 @@ ) ; - + } - - + + /* add line after items */ - + $page -> @@ -577,12 +582,12 @@ ) ; - - + + /* Add totals */ - + $page @@ -599,12 +604,12 @@ ) ; - - + + /* add note */ - + $page @@ -624,12 +629,12 @@ ) ; - - + + // Add footer - + $this -> @@ -646,23 +651,9 @@ ) ; - - - } - - - - - $this - -> - _afterGetPdf - ( - ) - ; - - - - + + + if ( @@ -675,8 +666,8 @@ { - - + + Mage :: app @@ -692,45 +683,79 @@ ) ; - + + + } + + } - + + + + // Revert back to the original current store + + + + Mage + :: + app + ( + ) + -> + setCurrentStore + ( + $currentStore + ) + ; + + + + + $this + -> + _afterGetPdf + ( + ) + ; + + + return $pdf ; - + } - - + + /** - + * Draw table header for product items - + * - + * @param Zend_Pdf_Page $page page to draw on - + * - + * @return void - + */ - + protected @@ -743,11 +768,11 @@ $page ) - + { - + $page -> @@ -757,12 +782,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -772,12 +797,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -787,7 +812,7 @@ ) ; - + $page -> @@ -824,8 +849,8 @@ ) ; - - + + $page -> @@ -840,7 +865,7 @@ ) ; - + $font @@ -857,8 +882,8 @@ ) ; - - + + $this -> @@ -869,15 +894,12 @@ 11 ; - + $page -> drawText ( - - - Mage :: helper @@ -890,9 +912,7 @@ 'Pos' ) , - - - + $this -> margin @@ -904,33 +924,26 @@ 3 , - - - + $this -> y , - - - + $this -> encoding - - - ) ; - + $page -> drawText ( - + Mage :: @@ -944,9 +957,7 @@ 'No.' ) , - - - + $this -> margin @@ -958,33 +969,29 @@ 25 , - - - + $this -> y , - - - + $this -> encoding - + ) ; - + $page -> drawText ( - + Mage :: @@ -998,9 +1005,7 @@ 'Description' ) , - - - + $this -> margin @@ -1010,34 +1015,53 @@ + - 120 + 130 , - - - + $this -> y , - - - + $this -> encoding - + ) ; - - + + + + $columns + + = + + array + ( + ) + ; + + - $singlePrice + $columns + [ + 'price' + ] = + array + ( + + + + 'label' + + => + Mage :: helper @@ -1047,79 +1071,173 @@ -> __ ( - 'Price (excl. tax)' + 'Price' + ) + , + + + + '_width' + + => + + 60 + + + ) ; - + - $page - -> - drawText + $columns + [ + 'price_incl_tax' + ] + + = + + array ( - + - $singlePrice + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Price (incl. tax)' + ) , - + - $this - -> - margin + '_width' + + => + + 60 + + + + ) + ; + + + + $columns [ - 'right' + 'qty' ] - - - - 153 + = - - + array + ( + + + + 'label' + + => - $this + Mage + :: + helper + ( + 'firegento_pdf' + ) -> - widthForStringUsingFontSize + __ ( - $singlePrice + 'Qty' + ) , + + + + '_width' - $font - , + => - 9 + 40 + + + ) - , + ; + + + + $columns + [ + 'tax' + ] + + = + + array + ( - $this + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) -> - y + __ + ( + 'Tax' + ) , - $this - -> - encoding + '_width' + + => + + 50 ) ; - - + - $page - -> - drawText + $columns + [ + 'tax_rate' + ] + + = + + array ( - + + 'label' + + => + Mage :: helper @@ -1129,49 +1247,85 @@ -> __ ( - 'Qty' + 'Tax rate' ) , - + - $this - -> - margin + '_width' + + => + + 50 + + + + ) + ; + + + + $columns [ - 'left' + 'subtotal' ] - + + = - 360 - , + array + ( - + - $this + 'label' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) -> - y + __ + ( + 'Total' + ) , - + - $this - -> - encoding + '_width' + + => + + 50 - + ) ; - - $taxLabel + $columns + [ + 'subtotal_incl_tax' + ] = + array + ( + + + + 'label' + + => + Mage :: helper @@ -1181,103 +1335,166 @@ -> __ ( - 'Tax' + 'Total (incl. tax)' ) - ; - - - - $page - -> - drawText - ( - - - - $taxLabel , - + - $this - -> - margin - [ - 'right' - ] + '_width' - - + => - 65 + 70 + + + + ) + ; + + + + // draw price, tax, and subtotal in specified order + + + + $columnsOrder - - + = - $this - -> - widthForStringUsingFontSize + explode ( - $taxLabel + ',' , - $font - , - - 9 + Mage + :: + getStoreConfig + ( + 'sales_pdf/invoice/item_price_column_order' ) - , - - - - $this - -> - y - , - - - - $this - -> - encoding + ) + ; + // draw starting from right + + + + $columnsOrder + + = + + array_reverse + ( + $columnsOrder ) ; - - $totalLabel + $columnOffset = - Mage - :: - helper + 0 + ; + + + + foreach + ( - 'firegento_pdf' + $columnsOrder + + as + + $columnName + ) + + { + + + + $columnName + + = + + trim + ( + $columnName ) + ; + + + + if + + ( + array_key_exists + ( + $columnName + , + + $columns + ) + ) + + { + + + + $column + + = + + $columns + [ + $columnName + ] + ; + + + + $labelWidth + + = + + $this -> - __ + widthForStringUsingFontSize ( - 'Total' + $column + [ + 'label' + ] + , + + $font + , + + 9 ) ; - - + + $page -> drawText ( - - - $totalLabel + + + $column + [ + 'label' + ] , - - + + $this -> margin @@ -1287,70 +1504,79 @@ - - 10 + $columnOffset - - $this - -> - widthForStringUsingFontSize - ( - $totalLabel - , - - $font - , - - 10 - ) + $labelWidth , - - + + $this -> y , - - + + $this -> encoding - - + + ) ; - + + + $columnOffset + + += + + $column + [ + '_width' + ] + ; + + + + } + + + + } + + } - - + + /** - + * Initialize renderer process. - + * - + * @param string $type renderer type to initialize - + * - + * @return void - + */ - + protected @@ -1361,11 +1587,11 @@ $type ) - + { - + parent :: @@ -1375,8 +1601,8 @@ ) ; - - + + $this -> @@ -1390,7 +1616,7 @@ array ( - + 'model' @@ -1399,7 +1625,7 @@ 'firegento_pdf/items_default' , - + 'renderer' @@ -1407,12 +1633,12 @@ null - + ) ; - + $this -> @@ -1426,7 +1652,7 @@ array ( - + 'model' @@ -1435,7 +1661,7 @@ 'firegento_pdf/items_grouped' , - + 'renderer' @@ -1443,12 +1669,12 @@ null - + ) ; - + $this -> @@ -1462,7 +1688,7 @@ array ( - + 'model' @@ -1471,7 +1697,7 @@ 'firegento_pdf/items_bundle' , - + 'renderer' @@ -1479,12 +1705,12 @@ null - + ) ; - + $this -> @@ -1498,7 +1724,7 @@ array ( - + 'model' @@ -1507,7 +1733,7 @@ 'firegento_pdf/items_downloadable' , - + 'renderer' @@ -1515,18 +1741,54 @@ null - + ) ; - + + + $this + -> + _renderers + [ + 'ugiftcert' + ] + + = + + array + ( + + + + 'model' + + => + + 'firegento_pdf/items_unirgy_default' + , + + + + 'renderer' + + => + + null + + + + ) + ; + + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xml index c5b990b..4518e18 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,54 +53,36 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Default invoice rendering engine. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Engine_Invoice_Default @@ -109,21 +91,21 @@ FireGento_Pdf_Model_Engine_Abstract - + { - - + + /** - + * constructor to set mode to invoice - + */ - + public @@ -133,11 +115,11 @@ ( ) - + { - + parent :: @@ -146,7 +128,7 @@ ) ; - + $this -> @@ -156,34 +138,34 @@ ) ; - + } - - + + /** - + * Return PDF document - + * - + * @param array $invoices invoices to render pdfs for - + * - + * @return Zend_Pdf - + */ - + public @@ -200,11 +182,32 @@ ) ) - + { - + + + $currentStore + + = + + Mage + :: + app + ( + ) + -> + getStore + ( + ) + -> + getCode + ( + ) + ; + + $this -> @@ -213,7 +216,7 @@ ) ; - + $this -> @@ -223,8 +226,8 @@ ) ; - - + + $pdf @@ -237,7 +240,7 @@ ) ; - + $this -> @@ -247,8 +250,8 @@ ) ; - - + + foreach @@ -262,11 +265,11 @@ { - + // pagecounter is 0 at the beginning, because it is incremented in newPage() - + $this -> @@ -277,7 +280,7 @@ 0 ; - + if @@ -291,7 +294,7 @@ { - + Mage :: @@ -313,7 +316,7 @@ ) ; - + Mage :: @@ -331,11 +334,12 @@ ) ; - + } - + + $order @@ -348,7 +352,7 @@ ) ; - + $this -> @@ -358,8 +362,8 @@ ) ; - - + + $page @@ -372,8 +376,8 @@ ) ; - - + + $this -> @@ -389,8 +393,8 @@ ) ; - - + + $this -> @@ -403,7 +407,7 @@ ) ; - + $this -> @@ -413,8 +417,8 @@ ) ; - - + + $this -> @@ -425,8 +429,8 @@ 20 ; - - + + $position @@ -435,8 +439,8 @@ 0 ; - - + + foreach @@ -454,7 +458,7 @@ { - + if @@ -472,17 +476,17 @@ { - + continue ; - + } - - + + $showFooter @@ -496,7 +500,7 @@ ) ; - + if @@ -532,7 +536,7 @@ { - + $page @@ -548,18 +552,18 @@ ) ; - + } - - + + $position ++ ; - + $page @@ -582,16 +586,16 @@ ) ; - + } - - + + /* add line after items */ - + $page -> @@ -632,12 +636,12 @@ ) ; - - + + /* add totals */ - + $page @@ -654,12 +658,12 @@ ) ; - - + + /* add note */ - + $page @@ -679,12 +683,12 @@ ) ; - - + + // Add footer - + $this -> @@ -701,12 +705,67 @@ ) ; + + + + if + + ( + $invoice + -> + getStoreId + ( + ) + ) + + { + + + + Mage + :: + app + ( + ) + -> + getLocale + ( + ) + -> + revert + ( + ) + ; + + + + } + } + + // Revert back to the original current store + + + + Mage + :: + app + ( + ) + -> + setCurrentStore + ( + $currentStore + ) + ; + + + $this -> @@ -715,42 +774,42 @@ ) ; - - + + return $pdf ; - + } - - + + /** - + * Insert Table Header for Items - + * - - * @param Zend_Pdf_Page &$page current page object of Zend_PDF + + * @param Zend_Pdf_Page $page current page object of Zend_PDF - + * - + * @return void - + */ - + protected @@ -758,15 +817,14 @@ insertTableHeader ( - & $page ) - + { - + $page -> @@ -776,12 +834,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -791,12 +849,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -806,7 +864,7 @@ ) ; - + $page -> @@ -843,8 +901,8 @@ ) ; - - + + $page -> @@ -859,7 +917,7 @@ ) ; - + $font @@ -876,8 +934,8 @@ ) ; - - + + $this -> @@ -888,7 +946,7 @@ 11 ; - + $page -> @@ -930,14 +988,14 @@ ) ; - + $page -> drawText ( - + Mage :: @@ -973,19 +1031,19 @@ -> encoding - + ) ; - + $page -> drawText ( - + Mage :: @@ -1021,13 +1079,13 @@ -> encoding - + ) ; - - + + $columns @@ -1038,7 +1096,7 @@ ) ; - + $columns [ @@ -1050,7 +1108,7 @@ array ( - + 'label' @@ -1069,7 +1127,7 @@ ) , - + '_width' @@ -1077,12 +1135,12 @@ 60 - + ) ; - + $columns [ @@ -1094,7 +1152,7 @@ array ( - + 'label' @@ -1113,7 +1171,7 @@ ) , - + '_width' @@ -1121,12 +1179,12 @@ 60 - + ) ; - + $columns [ @@ -1138,7 +1196,7 @@ array ( - + 'label' @@ -1157,7 +1215,7 @@ ) , - + '_width' @@ -1165,12 +1223,12 @@ 40 - + ) ; - + $columns [ @@ -1182,7 +1240,7 @@ array ( - + 'label' @@ -1201,7 +1259,7 @@ ) , - + '_width' @@ -1209,12 +1267,12 @@ 50 - + ) ; - + $columns [ @@ -1226,7 +1284,7 @@ array ( - + 'label' @@ -1245,7 +1303,7 @@ ) , - + '_width' @@ -1253,12 +1311,12 @@ 50 - + ) ; - + $columns [ @@ -1270,7 +1328,7 @@ array ( - + 'label' @@ -1289,7 +1347,7 @@ ) , - + '_width' @@ -1297,12 +1355,12 @@ 50 - + ) ; - + $columns [ @@ -1314,7 +1372,7 @@ array ( - + 'label' @@ -1333,7 +1391,7 @@ ) , - + '_width' @@ -1341,16 +1399,16 @@ 70 - + ) ; - + // draw price, tax, and subtotal in specified order - + $columnsOrder @@ -1370,11 +1428,11 @@ ) ; - + // draw starting from right - + $columnsOrder @@ -1386,7 +1444,7 @@ ) ; - + $columnOffset @@ -1395,7 +1453,7 @@ 0 ; - + foreach @@ -1409,7 +1467,7 @@ { - + $columnName @@ -1421,7 +1479,7 @@ ) ; - + if @@ -1437,7 +1495,7 @@ { - + $column @@ -1449,7 +1507,7 @@ ] ; - + $labelWidth @@ -1472,14 +1530,14 @@ ) ; - + $page -> drawText ( - + $column [ @@ -1487,7 +1545,7 @@ ] , - + $this -> @@ -1505,25 +1563,25 @@ $labelWidth , - + $this -> y , - + $this -> encoding - + ) ; - + $columnOffset @@ -1535,42 +1593,42 @@ ] ; - + } - + } - + } - - + + /** - + * Initialize renderer process - + * - + * @param string $type renderer type to be initialized - + * - + * @return void - + */ - + protected @@ -1581,11 +1639,11 @@ $type ) - + { - + parent :: @@ -1595,8 +1653,8 @@ ) ; - - + + $this -> @@ -1610,7 +1668,7 @@ array ( - + 'model' @@ -1619,7 +1677,7 @@ 'firegento_pdf/items_default' , - + 'renderer' @@ -1627,12 +1685,12 @@ null - + ) ; - + $this -> @@ -1646,7 +1704,7 @@ array ( - + 'model' @@ -1655,7 +1713,7 @@ 'firegento_pdf/items_grouped' , - + 'renderer' @@ -1663,12 +1721,12 @@ null - + ) ; - + $this -> @@ -1682,7 +1740,7 @@ array ( - + 'model' @@ -1691,7 +1749,7 @@ 'firegento_pdf/items_bundle' , - + 'renderer' @@ -1699,12 +1757,12 @@ null - + ) ; - + $this -> @@ -1718,7 +1776,7 @@ array ( - + 'model' @@ -1727,7 +1785,7 @@ 'firegento_pdf/items_downloadable' , - + 'renderer' @@ -1735,18 +1793,54 @@ null - + ) ; - + + + $this + -> + _renderers + [ + 'ugiftcert' + ] + + = + + array + ( + + + + 'model' + + => + + 'firegento_pdf/items_unirgy_default' + , + + + + 'renderer' + + => + + null + + + + ) + ; + + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xml index 54e2a2a..d7d3f38 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,80 +53,61 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - - + /** - + * Shipment model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Engine_Shipment_Default - + extends FireGento_Pdf_Model_Engine_Abstract - + { - - + + /** - + * constructor to set shipping mode - + */ - + public @@ -136,11 +117,11 @@ ( ) - + { - + parent :: @@ -149,7 +130,7 @@ ) ; - + $this -> @@ -159,34 +140,34 @@ ) ; - + } - - + + /** - + * Return PDF document - + * - + * @param array $shipments list of shipments to generate pdfs for - + * - + * @return Zend_Pdf - + */ - + public @@ -203,11 +184,32 @@ ) ) - + { - + + + $currentStore + + = + + Mage + :: + app + ( + ) + -> + getStore + ( + ) + -> + getCode + ( + ) + ; + + $this -> @@ -216,7 +218,7 @@ ) ; - + $this -> @@ -226,8 +228,8 @@ ) ; - - + + $pdf @@ -240,7 +242,7 @@ ) ; - + $this -> @@ -250,8 +252,8 @@ ) ; - - + + foreach @@ -265,11 +267,11 @@ { - + // pagecounter is 0 at the beginning, because it is incremented in newPage() - + $this -> @@ -280,7 +282,7 @@ 0 ; - + if @@ -294,7 +296,7 @@ { - + Mage :: @@ -316,7 +318,7 @@ ) ; - + Mage :: @@ -334,11 +336,12 @@ ) ; - + } - + + $order @@ -351,7 +354,7 @@ ) ; - + $this -> @@ -361,8 +364,8 @@ ) ; - - + + $page @@ -378,8 +381,8 @@ ) ; - - + + $this -> @@ -395,8 +398,8 @@ ) ; - - + + $this -> @@ -409,7 +412,7 @@ ) ; - + $this -> @@ -419,8 +422,8 @@ ) ; - - + + $this -> @@ -431,8 +434,8 @@ 20 ; - - + + $position @@ -441,8 +444,8 @@ 0 ; - - + + foreach @@ -460,7 +463,7 @@ { - + if @@ -478,17 +481,17 @@ { - + continue ; - + } - - + + if @@ -501,7 +504,7 @@ 50 - + || @@ -513,13 +516,13 @@ 'sales_pdf/firegento_pdf/show_footer' ) - + == 1 - + && @@ -532,13 +535,13 @@ 100 ) - + ) { - + $page @@ -554,18 +557,18 @@ ) ; - + } - - + + $position ++ ; - + $page @@ -588,16 +591,41 @@ ) ; - + } - - + + + + /* add shipment tracks */ + + + + $page + + = + + $this + -> + _printShipmentTracks + ( + $page + , + + $order + , + + $shipment + ) + ; + + + /* add note */ - + $page @@ -617,12 +645,12 @@ ) ; - - + + // Add footer - + $this -> @@ -639,12 +667,67 @@ ) ; + + + + if + + ( + $shipment + -> + getStoreId + ( + ) + ) + + { + - + + Mage + :: + app + ( + ) + -> + getLocale + ( + ) + -> + revert + ( + ) + ; + + + } - + + } + + + + + // Revert back to the original current store + + + + Mage + :: + app + ( + ) + -> + setCurrentStore + ( + $currentStore + ) + ; + + + $this -> @@ -653,45 +736,45 @@ ) ; - - + + return $pdf ; - + } - - + + /** - + * Inserts the customer's shipping address. - + * - - * @param Zend_Pdf_Page &$page current page object of Zend_Pdf + + * @param Zend_Pdf_Page $page current page object of Zend_Pdf - + * @param Mage_Sales_Model_Order $order order object - + * - + * @return void - + */ - + protected @@ -699,18 +782,17 @@ _insertCustomerAddress ( - & $page , $order ) - + { - + $this -> @@ -723,7 +805,7 @@ ) ; - + $shipping @@ -738,9 +820,6 @@ getShippingAddress ( ) - - - -> format ( @@ -749,7 +828,7 @@ ) ; - + foreach @@ -763,7 +842,7 @@ { - + $page -> @@ -785,9 +864,7 @@ 'left' ] , - - - + $this -> y @@ -799,7 +876,7 @@ ) ; - + $this -> @@ -809,32 +886,32 @@ ) ; - + } - + } - - + + /** - + * insert the table header of the shipment - + * - + * @param Zend_Pdf_Page $page page to write on - + */ - + protected @@ -845,11 +922,11 @@ $page ) - + { - + $page -> @@ -859,12 +936,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -874,12 +951,12 @@ -> colors [ - 'grey1' + 'header' ] ) ; - + $page -> @@ -889,7 +966,7 @@ ) ; - + $page -> @@ -907,9 +984,7 @@ -> y , - - - + $this -> margin @@ -932,8 +1007,8 @@ ) ; - - + + $page -> @@ -948,7 +1023,7 @@ ) ; - + $this -> @@ -961,8 +1036,8 @@ ) ; - - + + $this -> @@ -973,14 +1048,14 @@ 11 ; - + $page -> drawText ( - + Mage :: @@ -995,7 +1070,7 @@ ) , - + $this -> @@ -1005,32 +1080,32 @@ ] , - + $this -> y , - + $this -> encoding - + ) ; - + $page -> drawText ( - + Mage :: @@ -1045,7 +1120,7 @@ ) , - + $this -> @@ -1059,33 +1134,33 @@ 105 , - + $this -> y , - + $this -> encoding - + ) ; - - + + $page -> drawText ( - + Mage :: @@ -1100,7 +1175,7 @@ ) , - + $this -> @@ -1114,49 +1189,49 @@ 450 , - + $this -> y , - + $this -> encoding - + ) ; - + } - - + + /** - + * insert address into pdf - + * - + * @param Zend_Pdf_Page $page to insert addres into - + * @param Mage_Sales_Model_Order $order order to get address from - + */ - + protected @@ -1170,11 +1245,11 @@ $order ) - + { - + $this -> @@ -1187,8 +1262,8 @@ ) ; - - + + $billing @@ -1203,9 +1278,6 @@ getShippingAddress ( ) - - - -> format ( @@ -1214,8 +1286,8 @@ ) ; - - + + foreach @@ -1229,7 +1301,7 @@ { - + $page -> @@ -1251,9 +1323,7 @@ 'left' ] , - - - + $this -> y @@ -1289,128 +1359,693 @@ /** - * Initialize renderer process. + * This will print all the shipment tracks. * - * @param string $type type to be initialized + * @param Zend_Pdf_Page $page - * + * @param Mage_Sales_Model_Order $order - * @return void + * @param Mage_Sales_Model_Order_Shipment $shipment - */ + * + * @return Zend_Pdf_Page + + + */ + + protected function - _initRenderer + _printShipmentTracks ( - $type + $page + , + + $order + , + + $shipment ) - + { - + - parent + if + + ( + ! + Mage :: - _initRenderer + getStoreConfigFlag ( - $type + 'sales_pdf/shipment/show_tracking_numbers' ) - ; - - - - - $this - -> - _renderers - [ - 'default' - ] - = + || - array + $order + -> + getIsVirtual ( + ) + ) + + { - 'model' - - => + return - 'firegento_pdf/items_shipment_default' - , + $page + ; - - 'renderer' - - => - - null - - - ) - ; + } + - $this - -> - _renderers - [ - 'bundle' - ] + $tracks = array ( + ) + ; - - 'model' - - => + + if - 'firegento_pdf/items_shipment_bundle' - , + ( + $shipment + ) + + { - 'renderer' + $tracks - => + = - null + $shipment + -> + getAllTracks + ( + ) + ; + } + + + + + if + + ( + empty + ( + $tracks + ) ) + + { + + + + return + + $page ; - - + + } - - + + + + $this + -> + y + + -= + + 20 + ; + + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'header' + ] + ) + ; + + + + $page + -> + setLineColor + ( + $this + -> + colors + [ + 'header' + ] + ) + ; + + + + $page + -> + setLineWidth + ( + 1 + ) + ; + + + + $page + -> + drawRectangle + ( + $this + -> + margin + [ + 'left' + ] + , + + $this + -> + y + , + + $this + -> + margin + [ + 'right' + ] + + - + + 10 + , + + $this + -> + y + + - + + 15 + ) + ; + + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'black' + ] + ) + ; + + + + $this + -> + _setFontRegular + ( + $page + , + + 9 + ) + ; + + + + $this + -> + y + + -= + + 11 + ; + + + + $page + -> + drawText + ( + Mage + :: + helper + ( + 'sales' + ) + -> + __ + ( + 'Carrier' + ) + , + + $this + -> + margin + [ + 'left' + ] + , + + $this + -> + y + , + + 'UTF-8' + ) + ; + + + + $page + -> + drawText + ( + Mage + :: + helper + ( + 'sales' + ) + -> + __ + ( + 'Number' + ) + , + + 290 + , + + $this + -> + y + , + + 'UTF-8' + ) + ; + + + + $page + -> + setFillColor + ( + $this + -> + colors + [ + 'text' + ] + ) + ; + + + + $this + -> + y + + -= + + 18 + ; + + + + foreach + + ( + $tracks + + as + + $track + ) + + { + + + + $maxTitleLen + + = + + 45 + ; + + + + $endOfTitle + + = + + strlen + ( + $track + -> + getTitle + ( + ) + ) + + > + + $maxTitleLen + + ? + + '...' + + : + + '' + ; + + + + $truncatedTitle + + = + + substr + ( + $track + -> + getTitle + ( + ) + , + + 0 + , + + $maxTitleLen + ) + + . + + $endOfTitle + ; + + + + $page + -> + drawText + ( + $truncatedTitle + , + + $this + -> + margin + [ + 'left' + ] + , + + $this + -> + y + , + + 'UTF-8' + ) + ; + + + + $page + -> + drawText + ( + $track + -> + getNumber + ( + ) + , + + 290 + , + + $this + -> + y + , + + 'UTF-8' + ) + ; + + + + $this + -> + y + + -= + + 18 + ; + + + + } + + + + + return + + $page + ; + + + + } + + + + + /** + + + * Initialize renderer process. + + + * + + + * @param string $type type to be initialized + + + * + + + * @return void + + + */ + + + + protected + + function + + _initRenderer + ( + $type + ) + + + + { + + + + parent + :: + _initRenderer + ( + $type + ) + ; + + + + + $this + -> + _renderers + [ + 'default' + ] + + = + + array + ( + + + + 'model' + + => + + 'firegento_pdf/items_shipment_default' + , + + + + 'renderer' + + => + + null + + + + ) + ; + + + + $this + -> + _renderers + [ + 'bundle' + ] + + = + + array + ( + + + + 'model' + + => + + 'firegento_pdf/items_shipment_bundle' + , + + + + 'renderer' + + => + + null + + + + ) + ; + + + + $this + -> + _renderers + [ + 'ugiftcert' + ] + + = + + array + ( + + + + 'model' + + => + + 'firegento_pdf/items_unirgy_shipment_default' + , + + + + 'renderer' + + => + + null + + + + ) + ; + + + + } + + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Invoice.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Invoice.php.xml index de08d59..7788d61 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Invoice.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Invoice.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,112 +53,98 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Invoice model rewrite. - + * - + * The invoice model serves as a proxy to the actual PDF engine as set via - + * backend configuration. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Invoice + + extends + + Mage_Sales_Model_Order_Pdf_Invoice - + { - - + + /** - + * The actual PDF engine responsible for rendering the file. - + * - + * @var Mage_Sales_Model_Order_Pdf_Abstract - + */ - + - private + protected $_engine ; - - + + /** - + * get pdf rendering engine - + * - + * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Invoice - + */ - + protected @@ -168,11 +154,11 @@ ( ) - + { - + if @@ -185,7 +171,7 @@ { - + $modelClass @@ -199,7 +185,7 @@ ) ; - + $engine @@ -213,23 +199,35 @@ ) ; - - + + if ( ! $engine + + || + + $engine + + instanceof + + FireGento_Pdf_Model_Invoice ) { - + // Fallback to Magento standard invoice layout. - + + + // use new here to circumvent our own rewrite + + $engine @@ -242,12 +240,12 @@ ) ; - + } - - + + $this -> @@ -258,12 +256,12 @@ $engine ; - + } - - + + return @@ -272,34 +270,34 @@ _engine ; - + } - - + + /** - + * get pdf for invoices - + * - + * @param array|Varien_Data_Collection $invoices invoices to render pdfs for - + * - + * @return mixed - + */ - + public @@ -316,11 +314,11 @@ ) ) - + { - + return @@ -336,13 +334,13 @@ ) ; - + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xml index 6a6dd82..b124272 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Bundle.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,54 +53,36 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Bundle item model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Items_Bundle @@ -109,32 +91,32 @@ Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice - + { - + /** - + * Draw item line. - + * - + * @param int $position position of the product - + * - + * @return void - + */ - + public @@ -149,11 +131,11 @@ 1 ) - + { - + $order @@ -166,7 +148,7 @@ ) ; - + $item @@ -179,7 +161,7 @@ ) ; - + $pdf @@ -192,7 +174,7 @@ ) ; - + $page @@ -205,8 +187,8 @@ ) ; - - + + $fontSize @@ -215,17 +197,8 @@ 9 ; - - - - $this - -> - _setFontRegular - ( - ) - ; - - + + $items @@ -239,8 +212,8 @@ ) ; - - + + $_prevOptionId @@ -249,7 +222,7 @@ '' ; - + $drawItems @@ -260,8 +233,8 @@ ) ; - - + + foreach @@ -275,7 +248,7 @@ { - + $line @@ -286,8 +259,8 @@ ) ; - - + + $attributes @@ -301,7 +274,7 @@ ) ; - + if @@ -314,7 +287,7 @@ { - + $optionId @@ -326,7 +299,7 @@ ] ; - + } @@ -334,7 +307,7 @@ { - + $optionId @@ -343,12 +316,12 @@ 0 ; - + } - - + + if @@ -365,7 +338,7 @@ { - + $drawItems [ @@ -377,7 +350,7 @@ array ( - + 'lines' @@ -388,7 +361,7 @@ ) , - + 'height' @@ -396,17 +369,17 @@ 15 - + ) ; - + } - - + + if @@ -424,7 +397,7 @@ { - + if @@ -441,7 +414,7 @@ { - + $line [ @@ -453,7 +426,7 @@ array ( - + 'font' @@ -462,7 +435,7 @@ 'italic' , - + 'text' @@ -493,7 +466,7 @@ ) , - + 'feed' @@ -511,7 +484,7 @@ 130 , - + 'font_size' @@ -519,13 +492,13 @@ $fontSize - + ) ; - - + + $drawItems [ @@ -537,7 +510,7 @@ array ( - + 'lines' @@ -549,7 +522,7 @@ ) , - + 'height' @@ -557,13 +530,13 @@ 15 - + ) ; - - + + $line @@ -574,8 +547,8 @@ ) ; - - + + $_prevOptionId @@ -587,20 +560,20 @@ ] ; - + } - + } - - + + // draw SKUs - + if @@ -619,7 +592,7 @@ { - + $text @@ -630,7 +603,7 @@ ) ; - + foreach @@ -661,7 +634,7 @@ { - + $text [ @@ -672,16 +645,16 @@ $part ; - + } - - + + // draw Position Number - + $line [ @@ -692,7 +665,7 @@ array ( - + 'text' @@ -701,7 +674,7 @@ $position , - + 'feed' @@ -719,7 +692,7 @@ 10 , - + 'align' @@ -728,7 +701,7 @@ 'right' , - + 'font_size' @@ -736,13 +709,13 @@ $fontSize - + ) ; - - + + $line [ @@ -753,7 +726,7 @@ array ( - + 'text' @@ -762,7 +735,7 @@ $text , - + 'feed' @@ -780,7 +753,7 @@ 25 , - + 'font_size' @@ -788,21 +761,21 @@ $fontSize - + ) ; - + } - - + + /* in case Product name is longer than 80 chars - it is written in a few lines */ - + if @@ -820,7 +793,7 @@ { - + $name @@ -834,7 +807,7 @@ ) ; - + } @@ -842,7 +815,7 @@ { - + $name @@ -855,11 +828,12 @@ ) ; - + } - + + $line [ @@ -870,7 +844,7 @@ array ( - + 'text' @@ -898,7 +872,7 @@ ) , - + 'feed' @@ -916,7 +890,7 @@ 130 , - + 'font_size' @@ -924,17 +898,17 @@ $fontSize - + ) ; - - + + // draw prices - + if @@ -949,7 +923,7 @@ { - + $columns @@ -960,11 +934,11 @@ ) ; - + // prepare qty - + $columns [ @@ -976,13 +950,13 @@ array ( - + 'text' => - $item + $_item -> getQty ( @@ -993,7 +967,7 @@ 1 , - + 'align' @@ -1002,7 +976,7 @@ 'right' , - + 'font_size' @@ -1011,7 +985,7 @@ $fontSize , - + '_width' @@ -1019,17 +993,17 @@ 30 - + ) ; - - + + // prepare price - + $columns [ @@ -1041,7 +1015,7 @@ array ( - + 'text' @@ -1051,7 +1025,7 @@ -> formatPriceTxt ( - $item + $_item -> getPrice ( @@ -1059,7 +1033,7 @@ ) , - + 'align' @@ -1068,7 +1042,7 @@ 'right' , - + 'font_size' @@ -1077,7 +1051,7 @@ $fontSize , - + '_width' @@ -1085,17 +1059,17 @@ 60 - + ) ; - - + + // prepare price_incl_tax - + $columns [ @@ -1107,7 +1081,7 @@ array ( - + 'text' @@ -1117,7 +1091,7 @@ -> formatPriceTxt ( - $item + $_item -> getPriceInclTax ( @@ -1125,7 +1099,7 @@ ) , - + 'align' @@ -1134,7 +1108,7 @@ 'right' , - + 'font_size' @@ -1143,7 +1117,7 @@ $fontSize , - + '_width' @@ -1151,17 +1125,17 @@ 60 - + ) ; - - + + // prepare tax - + $columns [ @@ -1173,7 +1147,7 @@ array ( - + 'text' @@ -1183,7 +1157,7 @@ -> formatPriceTxt ( - $item + $_item -> getTaxAmount ( @@ -1191,7 +1165,7 @@ + - $item + $_item -> getHiddenTaxAmount ( @@ -1199,7 +1173,7 @@ ) , - + 'align' @@ -1208,7 +1182,7 @@ 'right' , - + 'font_size' @@ -1217,7 +1191,7 @@ $fontSize , - + '_width' @@ -1225,17 +1199,17 @@ 50 - + ) ; - - + + // prepare tax_rate - + $columns [ @@ -1247,7 +1221,7 @@ array ( - + 'text' @@ -1255,7 +1229,7 @@ round ( - $item + $_item -> getOrderItem ( @@ -1274,7 +1248,7 @@ '%' , - + 'align' @@ -1283,7 +1257,7 @@ 'right' , - + 'font_size' @@ -1292,7 +1266,7 @@ $fontSize , - + '_width' @@ -1300,17 +1274,17 @@ 50 - + ) ; - - + + // prepare subtotal - + $columns [ @@ -1322,7 +1296,7 @@ array ( - + 'text' @@ -1332,7 +1306,7 @@ -> formatPriceTxt ( - $item + $_item -> getRowTotal ( @@ -1340,7 +1314,7 @@ ) , - + 'align' @@ -1349,7 +1323,7 @@ 'right' , - + 'font_size' @@ -1358,7 +1332,7 @@ $fontSize , - + '_width' @@ -1366,17 +1340,17 @@ 50 - + ) ; - - + + // prepare subtotal_incl_tax - + $columns [ @@ -1388,7 +1362,7 @@ array ( - + 'text' @@ -1398,7 +1372,7 @@ -> formatPriceTxt ( - $item + $_item -> getRowTotalInclTax ( @@ -1406,7 +1380,7 @@ ) , - + 'align' @@ -1415,7 +1389,7 @@ 'right' , - + 'font_size' @@ -1424,7 +1398,7 @@ $fontSize , - + '_width' @@ -1432,17 +1406,17 @@ 70 - + ) ; - - + + // draw columns in specified order - + $columnsOrder @@ -1462,11 +1436,11 @@ ) ; - + // draw starting from right - + $columnsOrder @@ -1478,7 +1452,7 @@ ) ; - + $columnOffset @@ -1487,7 +1461,7 @@ 0 ; - + foreach @@ -1501,7 +1475,7 @@ { - + $columnName @@ -1513,7 +1487,7 @@ ) ; - + if @@ -1529,7 +1503,7 @@ { - + $column @@ -1541,7 +1515,7 @@ ] ; - + $column [ @@ -1562,7 +1536,7 @@ $columnOffset ; - + $columnOffset @@ -1574,7 +1548,7 @@ ] ; - + unset ( @@ -1585,7 +1559,7 @@ ) ; - + $line [ @@ -1596,20 +1570,20 @@ $column ; - + } - + } - + } - - + + $drawItems [ @@ -1626,16 +1600,16 @@ $line ; - + } - - + + // custom options - + $options @@ -1652,7 +1626,7 @@ ) ; - + if @@ -1662,7 +1636,7 @@ { - + if @@ -1678,7 +1652,7 @@ { - + foreach @@ -1695,7 +1669,7 @@ { - + $lines @@ -1706,7 +1680,7 @@ ) ; - + $lines [ @@ -1719,7 +1693,7 @@ array ( - + 'text' @@ -1753,7 +1727,7 @@ ) , - + 'font' @@ -1762,7 +1736,7 @@ 'italic' , - + 'feed' @@ -1770,26 +1744,29 @@ 35 - + ) ; - - + + if ( + isset + ( $option [ 'value' ] ) + ) { - + $text @@ -1800,7 +1777,7 @@ ) ; - + $_printValue @@ -1814,7 +1791,7 @@ ] ) - + ? @@ -1823,7 +1800,7 @@ 'print_value' ] - + : @@ -1836,7 +1813,7 @@ ) ; - + $values @@ -1851,7 +1828,7 @@ ) ; - + foreach @@ -1865,7 +1842,7 @@ { - + foreach @@ -1898,7 +1875,7 @@ { - + $text [ @@ -1909,16 +1886,16 @@ $_value ; - + } - + } - - + + $lines [ @@ -1931,7 +1908,7 @@ array ( - + 'text' @@ -1940,7 +1917,7 @@ $text , - + 'feed' @@ -1948,17 +1925,17 @@ 40 - + ) ; - + } - - + + $drawItems [ @@ -1969,7 +1946,7 @@ array ( - + 'lines' @@ -1978,7 +1955,7 @@ $lines , - + 'height' @@ -1986,25 +1963,25 @@ 15 - + ) ; - + } - + } - + } - - + + $page @@ -2031,7 +2008,7 @@ ) ; - + $this -> @@ -2041,12 +2018,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Default.php.xml index 07b9de4..03fd839 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Default.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Default.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,54 +53,36 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Default item model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Items_Default @@ -109,32 +91,32 @@ Mage_Sales_Model_Order_Pdf_Items_Invoice_Default - + { - + /** - + * Draw item line. - + * - + * @param int $position position of the product - + * - + * @return void - + */ - + public @@ -149,11 +131,11 @@ 1 ) - + { - + $order @@ -166,7 +148,7 @@ ) ; - + $item @@ -179,7 +161,7 @@ ) ; - + $pdf @@ -192,7 +174,7 @@ ) ; - + $page @@ -205,7 +187,21 @@ ) ; - + + + $helper + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + ; + + $lines @@ -216,8 +212,8 @@ ) ; - - + + $fontSize @@ -226,12 +222,12 @@ 9 ; - - + + // draw Position Number - + $lines [ @@ -243,12 +239,12 @@ array ( - + array ( - + 'text' @@ -257,7 +253,7 @@ $position , - + 'feed' @@ -275,7 +271,7 @@ 10 , - + 'align' @@ -284,7 +280,7 @@ 'right' , - + 'font_size' @@ -292,21 +288,21 @@ $fontSize - + ) - + ) ; - - + + // draw SKU - + $lines [ @@ -320,7 +316,7 @@ array ( - + 'text' @@ -347,7 +343,7 @@ ) , - + 'feed' @@ -365,7 +361,7 @@ 25 , - + 'font_size' @@ -373,17 +369,17 @@ $fontSize - + ) ; - - + + // draw Product name - + $lines [ @@ -397,7 +393,7 @@ array ( - + 'text' @@ -429,7 +425,7 @@ ) , - + 'feed' @@ -447,7 +443,7 @@ 130 , - + 'font_size' @@ -455,13 +451,13 @@ $fontSize - + ) ; - - + + $options @@ -474,7 +470,7 @@ ) ; - + if @@ -484,7 +480,7 @@ { - + foreach @@ -498,7 +494,7 @@ { - + $optionTxt @@ -514,24 +510,27 @@ ': ' ; - + // append option value - + if ( + isset + ( $option [ 'value' ] ) + ) { - + $optionTxt @@ -563,11 +562,12 @@ ) ; - + } - + + $optionArray @@ -597,7 +597,7 @@ ) ; - + $lines [ @@ -610,19 +610,19 @@ array ( - + 'text' - + => $optionArray , - + 'feed' - + => $pdf @@ -635,22 +635,36 @@ + 135 + , + + + + 'color' + + => + + $helper + -> + getLabelColor + ( + ) + , - + ) ; - + } - + } - - + + $columns @@ -661,11 +675,11 @@ ) ; - + // prepare qty - + $columns [ @@ -677,7 +691,7 @@ array ( - + 'text' @@ -694,7 +708,7 @@ 1 , - + 'align' @@ -703,7 +717,7 @@ 'right' , - + 'font_size' @@ -712,7 +726,7 @@ $fontSize , - + '_width' @@ -720,17 +734,17 @@ 30 - + ) ; - - + + // prepare price - + $columns [ @@ -742,7 +756,7 @@ array ( - + 'text' @@ -760,7 +774,7 @@ ) , - + 'align' @@ -769,7 +783,7 @@ 'right' , - + 'font_size' @@ -778,7 +792,7 @@ $fontSize , - + '_width' @@ -786,17 +800,17 @@ 60 - + ) ; - - + + // prepare price_incl_tax - + $columns [ @@ -808,7 +822,7 @@ array ( - + 'text' @@ -826,7 +840,7 @@ ) , - + 'align' @@ -835,7 +849,7 @@ 'right' , - + 'font_size' @@ -844,7 +858,7 @@ $fontSize , - + '_width' @@ -852,17 +866,17 @@ 60 - + ) ; - - + + // prepare tax - + $columns [ @@ -874,7 +888,7 @@ array ( - + 'text' @@ -900,7 +914,7 @@ ) , - + 'align' @@ -909,7 +923,7 @@ 'right' , - + 'font_size' @@ -918,7 +932,7 @@ $fontSize , - + '_width' @@ -926,17 +940,17 @@ 50 - + ) ; - - + + // prepare tax_rate - + $columns [ @@ -948,7 +962,7 @@ array ( - + 'text' @@ -975,7 +989,7 @@ '%' , - + 'align' @@ -984,7 +998,7 @@ 'right' , - + 'font_size' @@ -993,7 +1007,7 @@ $fontSize , - + '_width' @@ -1001,17 +1015,17 @@ 50 - + ) ; - - + + // prepare subtotal - + $columns [ @@ -1023,7 +1037,7 @@ array ( - + 'text' @@ -1041,7 +1055,7 @@ ) , - + 'align' @@ -1050,7 +1064,7 @@ 'right' , - + 'font_size' @@ -1059,7 +1073,7 @@ $fontSize , - + '_width' @@ -1067,17 +1081,17 @@ 50 - + ) ; - - + + // prepare subtotal_incl_tax - + $columns [ @@ -1089,7 +1103,7 @@ array ( - + 'text' @@ -1107,7 +1121,7 @@ ) , - + 'align' @@ -1116,7 +1130,7 @@ 'right' , - + 'font_size' @@ -1125,7 +1139,7 @@ $fontSize , - + '_width' @@ -1133,17 +1147,17 @@ 70 - + ) ; - - + + // draw columns in specified order - + $columnsOrder @@ -1163,11 +1177,11 @@ ) ; - + // draw starting from right - + $columnsOrder @@ -1179,7 +1193,7 @@ ) ; - + $columnOffset @@ -1188,7 +1202,7 @@ 0 ; - + foreach @@ -1202,7 +1216,7 @@ { - + $columnName @@ -1214,7 +1228,7 @@ ) ; - + if @@ -1230,7 +1244,7 @@ { - + $column @@ -1242,7 +1256,7 @@ ] ; - + $column [ @@ -1263,7 +1277,7 @@ $columnOffset ; - + $columnOffset @@ -1275,7 +1289,7 @@ ] ; - + unset ( @@ -1286,7 +1300,7 @@ ) ; - + $lines [ @@ -1300,16 +1314,16 @@ $column ; - + } - + } - - + + if @@ -1336,11 +1350,11 @@ { - + // print discount - + $text @@ -1356,12 +1370,12 @@ __ ( - + 'You get a discount of %s.' , - + $order -> @@ -1374,12 +1388,12 @@ ) ) - + ) ; - + $lines [ @@ -1392,7 +1406,7 @@ array ( - + 'text' @@ -1401,7 +1415,7 @@ $text , - + 'align' @@ -1410,7 +1424,7 @@ 'right' , - + 'feed' @@ -1427,17 +1441,17 @@ $columnOffset - + ) ; - + } - - + + $lineBlock @@ -1446,7 +1460,7 @@ array ( - + 'lines' @@ -1455,7 +1469,7 @@ $lines , - + 'height' @@ -1463,13 +1477,13 @@ 15 - + ) ; - - + + $page @@ -1499,7 +1513,7 @@ ) ; - + $this -> @@ -1509,12 +1523,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xml index c1da529..f284da1 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -61,65 +61,64 @@ */ - - + /** - + * Class FireGento_Pdf_Model_Items_Downloadable - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - + */ - + class FireGento_Pdf_Model_Items_Downloadable - + extends Mage_Downloadable_Model_Sales_Order_Pdf_Items_Invoice - + { - + /** - + * Draw item line. - + * - + * @param int $position position of the product - + * - + * @return void - + */ - + public @@ -134,11 +133,11 @@ 1 ) - + { - + $order @@ -151,7 +150,7 @@ ) ; - + $item @@ -164,7 +163,7 @@ ) ; - + $pdf @@ -177,7 +176,7 @@ ) ; - + $page @@ -190,6 +189,20 @@ ) ; + + + $helper + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + ; + $lines @@ -514,11 +527,14 @@ if ( + isset + ( $option [ 'value' ] ) + ) { @@ -535,9 +551,6 @@ 'print_value' ] ) - - - ? $option @@ -556,10 +569,11 @@ ) ; - + } + $optionArray @@ -575,9 +589,7 @@ $page , - - - + $pdf -> getFontRegular @@ -592,7 +604,7 @@ ) ; - + $lines [ @@ -605,19 +617,19 @@ array ( - + 'text' - + => $optionArray , - + 'feed' - + => $pdf @@ -630,6 +642,20 @@ + 135 + , + + + + 'color' + + => + + $helper + -> + getLabelColor + ( + ) + , @@ -1157,15 +1183,13 @@ 2 ) - - - + . '%' , - + 'align' @@ -1174,7 +1198,7 @@ 'right' , - + 'font_size' @@ -1183,7 +1207,7 @@ $fontSize , - + '_width' @@ -1191,17 +1215,17 @@ 50 - + ) ; - - + + // prepare subtotal - + $columns [ @@ -1213,7 +1237,7 @@ array ( - + 'text' @@ -1228,9 +1252,7 @@ getPrice ( ) - - - + * $item @@ -1245,7 +1267,7 @@ ) , - + 'align' @@ -1254,7 +1276,7 @@ 'right' , - + 'font_size' @@ -1263,7 +1285,7 @@ $fontSize , - + '_width' @@ -1271,17 +1293,17 @@ 50 - + ) ; - - + + // prepare subtotal_incl_tax - + $columns [ @@ -1293,7 +1315,7 @@ array ( - + 'text' @@ -1309,9 +1331,7 @@ getPrice ( ) - - - + * $item @@ -1335,7 +1355,7 @@ ) , - + 'align' @@ -1344,7 +1364,7 @@ 'right' , - + 'font_size' @@ -1353,7 +1373,7 @@ $fontSize , - + '_width' @@ -1361,17 +1381,17 @@ 70 - + ) ; - - + + // draw columns in specified order - + $columnsOrder @@ -1381,9 +1401,7 @@ ( ',' , - - - + Mage :: getStoreConfig @@ -1393,11 +1411,11 @@ ) ; - + // draw starting from right - + $columnsOrder @@ -1409,7 +1427,7 @@ ) ; - + $columnOffset @@ -1418,7 +1436,7 @@ 0 ; - + foreach @@ -1432,7 +1450,7 @@ { - + $columnName @@ -1444,7 +1462,7 @@ ) ; - + if @@ -1460,7 +1478,7 @@ { - + $column @@ -1472,7 +1490,7 @@ ] ; - + $column [ @@ -1493,7 +1511,7 @@ $columnOffset ; - + $columnOffset @@ -1505,7 +1523,7 @@ ] ; - + unset ( @@ -1516,7 +1534,7 @@ ) ; - + $lines [ @@ -1530,16 +1548,16 @@ $column ; - + } - + } - - + + if @@ -1551,7 +1569,7 @@ 'sales_pdf/invoice/show_item_discount' ) - + && @@ -1565,17 +1583,17 @@ ( ) - + ) { - + // print discount - + $text @@ -1591,12 +1609,12 @@ __ ( - + 'You get a discount of %s.' , - + $order -> @@ -1609,12 +1627,12 @@ ) ) - + ) ; - + $lines [ @@ -1627,7 +1645,7 @@ array ( - + 'text' @@ -1636,7 +1654,7 @@ $text , - + 'align' @@ -1645,7 +1663,7 @@ 'right' , - + 'feed' @@ -1662,17 +1680,17 @@ $columnOffset - + ) ; - + } - - + + $lineBlock @@ -1681,7 +1699,7 @@ array ( - + 'lines' @@ -1690,7 +1708,7 @@ $lines , - + 'height' @@ -1698,13 +1716,13 @@ 15 - + ) ; - - + + $page @@ -1722,9 +1740,7 @@ $lineBlock ) , - - - + array ( 'table_header' @@ -1736,7 +1752,7 @@ ) ; - + $this -> @@ -1746,12 +1762,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xml index 9379a05..14a9442 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Grouped.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -80,15 +80,9 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - */ - + class FireGento_Pdf_Model_Items_Grouped @@ -97,32 +91,32 @@ Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped - + { - + /** - + * Draw item line. - + * - + * @param int $position position of the product - + * - + * @return void - + */ - + public @@ -137,11 +131,11 @@ 1 ) - + { - + $type @@ -162,7 +156,7 @@ ) ; - + $renderer @@ -180,7 +174,7 @@ ) ; - + $renderer -> @@ -194,7 +188,7 @@ ) ; - + $renderer -> @@ -208,7 +202,7 @@ ) ; - + $renderer -> @@ -222,7 +216,7 @@ ) ; - + $renderer -> @@ -236,8 +230,8 @@ ) ; - - + + $renderer -> @@ -247,7 +241,7 @@ ) ; - + $this -> @@ -261,12 +255,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xml index f598bd1..6ef2301 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -80,21 +80,9 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - */ - + class FireGento_Pdf_Model_Items_Shipment_Bundle @@ -103,26 +91,26 @@ Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment - + { - + /** - + * Draw item line. - + * - + * @return void - + */ - + public @@ -132,11 +120,11 @@ ( ) - + { - + $item @@ -149,7 +137,7 @@ ) ; - + $pdf @@ -162,7 +150,7 @@ ) ; - + $page @@ -175,18 +163,8 @@ ) ; - - - - $this - -> - _setFontRegular - ( - ) - ; - - - + + $shipItems @@ -200,7 +178,7 @@ ) ; - + $items @@ -230,8 +208,8 @@ ) ; - - + + $_prevOptionId @@ -240,7 +218,7 @@ '' ; - + $drawItems @@ -251,8 +229,8 @@ ) ; - - + + foreach @@ -266,7 +244,7 @@ { - + $line @@ -277,8 +255,8 @@ ) ; - - + + $attributes @@ -292,7 +270,7 @@ ) ; - + if @@ -305,7 +283,7 @@ { - + $optionId @@ -317,7 +295,7 @@ ] ; - + } @@ -325,7 +303,7 @@ { - + $optionId @@ -334,12 +312,12 @@ 0 ; - + } - - + + if @@ -356,7 +334,7 @@ { - + $drawItems [ @@ -368,7 +346,7 @@ array ( - + 'lines' @@ -379,7 +357,7 @@ ) , - + 'height' @@ -387,17 +365,17 @@ 15 - + ) ; - + } - - + + if @@ -411,7 +389,7 @@ { - + if @@ -428,7 +406,7 @@ { - + $line [ @@ -440,7 +418,7 @@ array ( - + 'font' @@ -449,7 +427,7 @@ 'italic' , - + 'text' @@ -480,7 +458,7 @@ ) , - + 'feed' @@ -488,13 +466,13 @@ 150 - + ) ; - - + + $drawItems [ @@ -506,7 +484,7 @@ array ( - + 'lines' @@ -518,7 +496,7 @@ ) , - + 'height' @@ -526,13 +504,13 @@ 15 - + ) ; - - + + $line @@ -543,8 +521,8 @@ ) ; - - + + $_prevOptionId @@ -556,20 +534,20 @@ ] ; - + } - + } - - + + // draw SKUs - + if @@ -584,7 +562,7 @@ { - + $text @@ -595,7 +573,7 @@ ) ; - + foreach @@ -626,7 +604,7 @@ { - + $text [ @@ -637,11 +615,12 @@ $part ; - + } - + + $line [ @@ -652,7 +631,7 @@ array ( - + 'text' @@ -661,7 +640,7 @@ $text , - + 'feed' @@ -670,7 +649,7 @@ 45 , - + 'width' @@ -678,21 +657,21 @@ 85 - + ) ; - + } - - + + // draw Name - + if @@ -706,7 +685,7 @@ { - + $name @@ -720,7 +699,7 @@ ) ; - + } @@ -728,7 +707,7 @@ { - + $name @@ -741,11 +720,12 @@ ) ; - + } - + + $text @@ -756,7 +736,7 @@ ) ; - + foreach @@ -789,7 +769,7 @@ { - + $text [ @@ -800,11 +780,12 @@ $part ; - + } - + + $line [ @@ -815,7 +796,7 @@ array ( - + 'text' @@ -824,7 +805,7 @@ $text , - + 'feed' @@ -833,7 +814,7 @@ 150 , - + 'align' @@ -842,7 +823,7 @@ 'left' , - + 'width' @@ -850,13 +831,13 @@ 375 - + ) ; - - + + if @@ -877,7 +858,7 @@ ) ) - + || @@ -899,13 +880,13 @@ ) ) - + ) { - + if @@ -925,7 +906,7 @@ { - + $qty @@ -947,7 +928,7 @@ 1 ; - + } @@ -963,7 +944,7 @@ { - + $qty @@ -982,7 +963,7 @@ ) ; - + } @@ -990,7 +971,7 @@ { - + $qty @@ -999,11 +980,11 @@ 0 ; - + } - + } @@ -1011,7 +992,7 @@ { - + $qty @@ -1020,12 +1001,12 @@ '' ; - + } - - + + $line [ @@ -1036,7 +1017,7 @@ array ( - + 'text' @@ -1045,7 +1026,7 @@ $qty , - + 'feed' @@ -1054,7 +1035,7 @@ 505 , - + 'align' @@ -1063,7 +1044,7 @@ 'left' , - + 'width' @@ -1071,13 +1052,13 @@ 10 - + ) ; - - + + $drawItems [ @@ -1094,16 +1075,16 @@ $line ; - + } - - + + // custom options - + $options @@ -1120,7 +1101,7 @@ ) ; - + if @@ -1130,7 +1111,7 @@ { - + if @@ -1146,7 +1127,7 @@ { - + foreach @@ -1163,7 +1144,7 @@ { - + $lines @@ -1174,7 +1155,7 @@ ) ; - + $lines [ @@ -1187,7 +1168,7 @@ array ( - + 'text' @@ -1221,7 +1202,7 @@ ) , - + 'font' @@ -1230,7 +1211,7 @@ 'italic' , - + 'feed' @@ -1238,26 +1219,29 @@ 60 - + ) ; - - + + if ( + isset + ( $option [ 'value' ] ) + ) { - + $text @@ -1268,7 +1252,7 @@ ) ; - + $_printValue @@ -1282,7 +1266,7 @@ ] ) - + ? @@ -1291,7 +1275,7 @@ 'print_value' ] - + : @@ -1304,7 +1288,7 @@ ) ; - + $values @@ -1319,7 +1303,7 @@ ) ; - + foreach @@ -1333,7 +1317,7 @@ { - + foreach @@ -1366,7 +1350,7 @@ { - + $text [ @@ -1377,16 +1361,16 @@ $_value ; - + } - + } - - + + $lines [ @@ -1399,7 +1383,7 @@ array ( - + 'text' @@ -1408,7 +1392,7 @@ $text , - + 'feed' @@ -1416,17 +1400,17 @@ 65 - + ) ; - + } - - + + $drawItems [ @@ -1437,7 +1421,7 @@ array ( - + 'lines' @@ -1446,7 +1430,7 @@ $lines , - + 'height' @@ -1454,25 +1438,25 @@ 15 - + ) ; - + } - + } - + } - - + + $page @@ -1499,7 +1483,7 @@ ) ; - + $this -> @@ -1509,12 +1493,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xml index 237d79d..7927f2e 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,54 +53,36 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Shipment default item model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Items_Shipment_Default @@ -109,26 +91,26 @@ Mage_Sales_Model_Order_Pdf_Items_Shipment_Default - + { - + /** - + * Draw item line. - + * - + * @return void - + */ - + public @@ -138,11 +120,11 @@ ( ) - + { - + $item @@ -155,7 +137,7 @@ ) ; - + $pdf @@ -168,7 +150,7 @@ ) ; - + $page @@ -181,7 +163,7 @@ ) ; - + $lines @@ -192,8 +174,8 @@ ) ; - - + + $fontSize @@ -202,12 +184,12 @@ 9 ; - - + + // draw SKU - + $lines [ @@ -221,7 +203,7 @@ array ( - + 'text' @@ -248,7 +230,7 @@ ) , - + 'feed' @@ -257,7 +239,7 @@ 45 , - + 'width' @@ -266,7 +248,7 @@ 85 , - + 'font_size' @@ -274,18 +256,18 @@ $fontSize - + ) ) ; - - + + // draw Product name - + $lines [ @@ -299,7 +281,7 @@ array ( - + 'text' @@ -331,7 +313,7 @@ ) , - + 'feed' @@ -340,7 +322,7 @@ 150 , - + 'align' @@ -349,7 +331,7 @@ 'left' , - + 'width' @@ -358,7 +340,7 @@ 375 , - + 'font_size' @@ -366,17 +348,17 @@ $fontSize - + ) ; - - + + // draw QTY - + $lines [ @@ -390,7 +372,7 @@ array ( - + 'text' @@ -405,7 +387,7 @@ 1 , - + 'feed' @@ -414,7 +396,7 @@ 505 , - + 'align' @@ -423,7 +405,7 @@ 'left' , - + 'width' @@ -432,7 +414,7 @@ 10 , - + 'font_size' @@ -440,13 +422,13 @@ $fontSize - + ) ; - - + + $options @@ -459,7 +441,7 @@ ) ; - + if @@ -469,7 +451,7 @@ { - + foreach @@ -483,11 +465,11 @@ { - + // draw options label - + $lines [ @@ -500,7 +482,7 @@ array ( - + 'text' @@ -534,7 +516,7 @@ ) , - + 'font' @@ -543,7 +525,7 @@ 'bold' , - + 'feed' @@ -560,30 +542,33 @@ 130 - + ) ; - - + + // draw options value - + if ( + isset + ( $option [ 'value' ] ) + ) { - + $_printVal @@ -615,7 +600,7 @@ ) ; - + $values @@ -630,7 +615,7 @@ ) ; - + foreach @@ -644,7 +629,7 @@ { - + $lines [ @@ -657,7 +642,7 @@ array ( - + 'text' @@ -685,7 +670,7 @@ ) , - + 'feed' @@ -702,29 +687,29 @@ 130 - + ) ; - + } - + } - + } - + } - - + + $lineBlock @@ -733,7 +718,7 @@ array ( - + 'lines' @@ -742,7 +727,7 @@ $lines , - + 'height' @@ -750,13 +735,13 @@ 15 - + ) ; - - + + $page @@ -786,7 +771,7 @@ ) ; - + $this -> @@ -796,12 +781,12 @@ ) ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xml new file mode 100644 index 0000000..cd707fc --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php.xml @@ -0,0 +1,163 @@ + + + + + <?php + + + /** + + + * This file is part of a FireGento e.V. module. + + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Default item model rewrite. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + + class + + FireGento_Pdf_Model_Items_Unirgy_Default + + extends + + FireGento_Pdf_Model_Items_Default + + + { + + + + + public + + function + + getItemOptions + ( + ) + + + + { + + + + $result + + = + + parent + :: + getItemOptions + ( + ) + ; + + + + Mage + :: + helper + ( + 'ugiftcert' + ) + -> + addOrderItemCertOptions + ( + $result + , + + $this + -> + getItem + ( + ) + ) + ; + + + + return + + $result + ; + + + + } + + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xml new file mode 100644 index 0000000..f59a2bf --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php.xml @@ -0,0 +1,163 @@ + + + + + <?php + + + /** + + + * This file is part of a FireGento e.V. module. + + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Default item model rewrite. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + + class + + FireGento_Pdf_Model_Items_Unirgy_Shipment_Default + + extends + + FireGento_Pdf_Model_Items_Shipment_Default + + + { + + + + + public + + function + + getItemOptions + ( + ) + + + + { + + + + $result + + = + + parent + :: + getItemOptions + ( + ) + ; + + + + Mage + :: + helper + ( + 'ugiftcert' + ) + -> + addOrderItemCertOptions + ( + $result + , + + $this + -> + getItem + ( + ) + ) + ; + + + + return + + $result + ; + + + + } + + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Observer.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Observer.php.xml index 963fd0e..7686247 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Observer.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Observer.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,84 +53,66 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * FireGento Pdf observer. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Observer - + { - + /** - + * Add notes to invoice document. - + * - + * @param Varien_Event_Observer $observer observer object - + * - + * @return FireGento_Pdf_Model_Observer - + */ - + public @@ -143,144 +125,176 @@ $observer ) - + { - + $this -> - addInvoiceDateNotice + _addShippingCountryNotes ( $observer ) ; - + $this -> - addInvoiceMaturity + _addInvoiceDateNotice ( $observer ) ; - + $this -> - addPaymentMethod + _addInvoiceMaturity ( $observer ) ; - + $this -> - addShippingMethod + _addPaymentMethod ( $observer + , + + 'invoice' ) ; - + $this -> - addInvoiceComments + _addShippingMethod ( $observer ) ; - - + + + $this + -> + _addInvoiceComments + ( + $observer + ) + ; + + + return $this ; - + } - - + + /** - - * add invoice date notice to pdf + + * Add notes based on shipping country - + * - + * @param Varien_Event_Observer $observer observer object - + * - + * @return $this - + */ - + - public + protected function - addInvoiceDateNotice + _addShippingCountryNotes ( Varien_Event_Observer $observer ) - + { - + - if + $order + + = + $observer + -> + getOrder ( - ! + ) + ; + + + + $shippingCountryNotes + + = + Mage :: - getStoreConfigFlag + helper ( - 'sales_pdf/invoice/show_date_notice' + 'firegento_pdf/invoice' ) + -> + getShippingCountryNotes + ( + $order ) - - { - - - - return - - $this ; - + + - } + if + + ( + ! + empty + ( + $shippingCountryNotes + ) + ) + + { - - - + + $result - + = $observer @@ -290,10 +304,10 @@ ) ; - - + + $notes - + = $result @@ -303,29 +317,23 @@ ) ; - - + + $notes - [ - ] = - Mage - :: - helper + array_merge ( - 'firegento_pdf' - ) - -> - __ - ( - 'Invoice date is equal to delivery date.' + $notes + , + + $shippingCountryNotes ) ; - - + + $result -> setNotes @@ -334,58 +342,91 @@ ) ; - + + + } + + + return $this ; - + } - - + + /** - - * Add maturity to invoice notes. + + * add invoice date notice to pdf - + * - + * @param Varien_Event_Observer $observer observer object - + * - - * @return FireGento_Pdf_Model_Observer + + * @return $this - + */ - + - public + protected function - addInvoiceMaturity + _addInvoiceDateNotice ( Varien_Event_Observer $observer ) - + { - + + + if + + ( + ! + Mage + :: + getStoreConfigFlag + ( + 'sales_pdf/invoice/show_date_notice' + ) + ) + + { + + + + return + + $this + ; + + + + } + + + $result @@ -398,7 +439,7 @@ ) ; - + $notes @@ -411,44 +452,152 @@ ) ; - - $maturity + $notes + [ + ] = Mage :: - getStoreConfig + helper ( - 'sales_pdf/invoice/maturity' + 'firegento_pdf' + ) + -> + __ + ( + 'Invoice date is equal to delivery date.' ) ; - if - - ( - ! - empty + $result + -> + setNotes ( - $maturity + $notes ) + ; + + + + return + + $this + ; + + + + } + + + + + /** + + + * Add maturity to invoice notes. + + + * + + + * @param Varien_Event_Observer $observer observer object + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + protected + + function + + _addInvoiceMaturity + ( + Varien_Event_Observer + + $observer + ) + + + + { + + + + $result + + = + + $observer + -> + getResult + ( + ) + ; + + + + $notes + + = + + $result + -> + getNotes + ( + ) + ; + + + + + $maturity + + = + + Mage + :: + getStoreConfig + ( + 'sales_pdf/invoice/maturity' + ) + ; + + + + if + + ( + ! + empty + ( + $maturity + ) + + || + + 0 + + < - || - - 0 - - < - $maturity ) { - + $maturity @@ -464,7 +613,7 @@ __ ( - + 'Invoice maturity: %s days' , @@ -476,12 +625,12 @@ 'sales_pdf/invoice/maturity' ) - + ) ; - + } @@ -497,7 +646,7 @@ { - + $maturity @@ -516,12 +665,12 @@ ) ; - + } - - + + $notes [ @@ -532,7 +681,7 @@ $maturity ; - + $result -> @@ -542,58 +691,61 @@ ) ; - + return $this ; - + } - - + + /** - - * Add payment method to invoice notes. + + * Add payment method to invoice / creditmemo notes. - + * - + * @param Varien_Event_Observer $observer observer object - + * - + * @return FireGento_Pdf_Model_Observer - + */ - + - public + protected function - addPaymentMethod + _addPaymentMethod ( Varien_Event_Observer $observer + , + + $mode ) - + { - + if @@ -602,10 +754,18 @@ :: getStoreConfig ( - 'sales_pdf/invoice/payment_method_position' + 'sales_pdf/' + + . + + $mode + + . + + '/payment_method_position' ) - + != @@ -613,25 +773,25 @@ :: POSITION_NOTE - + ) { - + return $this ; - + } - - + + $result @@ -644,7 +804,7 @@ ) ; - + $notes @@ -657,7 +817,7 @@ ) ; - + $notes [ @@ -675,7 +835,7 @@ __ ( - + 'Payment method: %s' , @@ -698,12 +858,12 @@ ( ) - + ) ; - + $result -> @@ -713,58 +873,58 @@ ) ; - + return $this ; - + } - - + + /** - + * Add shipping method to invoice notes. - + * - + * @param Varien_Event_Observer $observer observer object - + * - + * @return FireGento_Pdf_Model_Observer - + */ - + - public + protected function - addShippingMethod + _addShippingMethod ( Varien_Event_Observer $observer ) - + { - + $invoice @@ -777,7 +937,7 @@ ) ; - + $shipment @@ -790,7 +950,7 @@ ) ; - + if @@ -807,7 +967,7 @@ $shipment ) - + || @@ -826,7 +986,7 @@ 'sales_pdf/invoice/shipping_method_position' ) - + != @@ -834,7 +994,7 @@ :: POSITION_NOTE - + || @@ -853,7 +1013,7 @@ 'sales_pdf/shipment/shipping_method_position' ) - + != @@ -861,25 +1021,25 @@ :: POSITION_NOTE - + ) { - + return $this ; - + } - - + + $result @@ -892,120 +1052,664 @@ ) ; - + + + $notes + + = + + $result + -> + getNotes + ( + ) + ; + + $notes + [ + ] = + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + + + + 'Shipping method: %s' + , + + $observer + -> + getOrder + ( + ) + -> + getShippingDescription + ( + ) + + + + ) + ; + + + + $result + -> + setNotes + ( + $notes + ) + ; + + + + return + + $this + ; + + + + } + + + + + /** + + + * Add the invoice comments + + + * + + + * @param Varien_Event_Observer $observer observer object + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + protected + + function + + _addInvoiceComments + ( + Varien_Event_Observer + + $observer + ) + + + + { + + + + if + + ( + ! + Mage + :: + getStoreConfigFlag + ( + 'sales_pdf/invoice/show_comments' + ) + ) + + { + + + + return + + $this + ; + + + + } + + + + + /** @var Mage_Sales_Model_Order_Invoice $invoice */ + + + + $invoice + + = + + $observer + -> + getInvoice + ( + ) + ; + + + + + /** @var Mage_Sales_Model_Resource_Order_Invoice_Comment_Collection $commentsCollection */ + + + + $commentsCollection + + = + + $invoice + -> + getCommentsCollection + ( + ) + ; + + + + $commentsCollection + -> + addVisibleOnFrontFilter + ( + ) + ; + + + + + $result + + = + + $observer + -> + getResult + ( + ) + ; + + + + $notes + + = + + $result + -> + getNotes + ( + ) + ; + + + + + foreach + + ( + $commentsCollection + + as + + $comment + ) + + { + + + + /** @var $comment Mage_Sales_Model_Order_Invoice_Comment */ + + + + $notes + [ + ] + + = + + $comment + -> + getComment + ( + ) + ; + + + + } + + + + + $result + -> + setNotes + ( + $notes + ) + ; + + + + return + + $this + ; + + + + } + + + + + /** + + + * Add notes to shipment document. + + + * + + + * @param Varien_Event_Observer $observer observer object + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + public + + function + + addShipmentNotes + ( + Varien_Event_Observer + + $observer + ) + + + + { + + + + $this + -> + _addShippingMethod + ( + $observer + ) + ; + + + + $this + -> + _addShipmentComments + ( + $observer + ) + ; + + + + + return + + $this + ; + + + + } + + + + + /** + + + * Add the shipment comments + + + * + + + * @param Varien_Event_Observer $observer observer object + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + protected + + function + + _addShipmentComments + ( + Varien_Event_Observer + + $observer + ) + + + + { + + + + if + + ( + ! + Mage + :: + getStoreConfigFlag + ( + 'sales_pdf/shipment/show_comments' + ) + ) + + { + + + + return + + $this + ; + + + + } + + + + + /** @var Mage_Sales_Model_Order_Shipment $shipment */ + + + + $shipment + + = + + $observer + -> + getShipment + ( + ) + ; + + + + + /** @var Mage_Sales_Model_Resource_Order_Shipment_Comment_Collection $commentsCollection */ + + + + $commentsCollection + + = + + $shipment + -> + getCommentsCollection + ( + ) + ; + + + + $commentsCollection + -> + addVisibleOnFrontFilter + ( + ) + ; + + + + + $result + + = + + $observer + -> + getResult + ( + ) + ; + + + + $notes + + = + + $result + -> + getNotes + ( + ) + ; + + + + + foreach + + ( + $commentsCollection + + as + + $comment + ) + + { + + + + /** @var $comment Mage_Sales_Model_Order_Shipment_Comment */ + + + + $notes + [ + ] + + = + + $comment + -> + getComment + ( + ) + ; + + + + } + + + + $result -> - getNotes + setNotes ( + $notes ) ; - + - $notes - [ - ] + return - = + $this + ; + + + + } + + + + + /** + + + * Add notes to credit memo document. + + + * + + + * @param Varien_Event_Observer $observer observer object + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + public - Mage - :: - helper - ( - 'firegento_pdf' - ) - -> - __ + function + + addCreditmemoNotes ( - - - - 'Shipping method: %s' - , + Varien_Event_Observer $observer - -> - getOrder - ( - ) - -> - getShippingDescription - ( ) - + + + { + + + $this + -> + _addPaymentMethod + ( + $observer + , + + 'creditmemo' ) ; - + - $result + $this -> - setNotes + _addCreditmemoComments ( - $notes + $observer ) ; - + + return $this ; - + } - - - + + /** - - * Add the invoice comments + + * Add the credit memo comments - + * - + * @param Varien_Event_Observer $observer observer object - + * - + * @return FireGento_Pdf_Model_Observer - + */ - + - public + protected function - addInvoiceComments + _addCreditmemoComments ( Varien_Event_Observer $observer ) - + { - + if @@ -1015,60 +1719,60 @@ :: getStoreConfigFlag ( - 'sales_pdf/invoice/show_comments' + 'sales_pdf/creditmemo/show_comments' ) ) { - + return $this ; - + } - - + + - /** @var Mage_Sales_Model_Order_Invoice $invoice */ + /** @var Mage_Sales_Model_Order_Creditmemo $creditmemo */ - + - $invoice + $creditmemo = $observer -> - getInvoice + getCreditmemo ( ) ; - - + + - /** @var Mage_Sales_Model_Resource_Order_Invoice_Comment_Collection $commentsCollection */ + /** @var Mage_Sales_Model_Resource_Order_Creditmemo_Comment_Collection $commentsCollection */ - + $commentsCollection = - $invoice + $creditmemo -> getCommentsCollection ( ) ; - + $commentsCollection -> @@ -1077,8 +1781,8 @@ ) ; - - + + $result @@ -1091,7 +1795,7 @@ ) ; - + $notes @@ -1104,8 +1808,8 @@ ) ; - - + + foreach @@ -1119,11 +1823,11 @@ { - + - /** @var $comment Mage_Sales_Model_Order_Invoice_Comment */ + /** @var $comment Mage_Sales_Model_Order_Creditmemo_Comment */ - + $notes [ @@ -1138,12 +1842,12 @@ ) ; - + } - - + + $result -> @@ -1153,58 +1857,142 @@ ) ; - + return $this ; - + } - - + + /** - - * Adds a barcode representing the order number to the shipment if activated. + + * Adds a barcode representing the order number to the invoice if activated - + * - - * @param Varien_Event_Observer $observer observer which is passed by magento + + * @param Varien_Event_Observer $observer observer which is passed by magento - + * - + * @return FireGento_Pdf_Model_Observer - + */ - + public function - addBarcode + addInvoiceBarcode ( Varien_Event_Observer $observer ) - + { - + + + if + + ( + ! + Mage + :: + getStoreConfigFlag + ( + 'sales_pdf/invoice/order_id_as_barcode' + ) + ) + + { + + + + return + + $this + ; + + + + } + + + + + return + + $this + -> + _addBarcode + ( + $observer + ) + ; + + + + } + + + + + /** + + + * Adds a barcode representing the order number to the shipment if activated + + + * + + + * @param Varien_Event_Observer $observer observer which is passed by magento + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + public + + function + + addShipmentBarcode + ( + Varien_Event_Observer + + $observer + ) + + + + { + + if @@ -1220,18 +2008,75 @@ { - + return $this ; - + } - + + + + return + + $this + -> + _addBarcode + ( + $observer + ) + ; + + + + } + + + + + /** + + + * Adds a barcode representing the order number to a PDF + + + * + + + * @param Varien_Event_Observer $observer observer which is passed by magento + + + * + + + * @return FireGento_Pdf_Model_Observer + + + */ + + + + protected + + function + + _addBarcode + ( + Varien_Event_Observer + + $observer + ) + + + + { + + $page @@ -1244,7 +2089,7 @@ ) ; - + $order @@ -1257,8 +2102,8 @@ ) ; - - + + $barcodeConfig @@ -1267,7 +2112,7 @@ array ( - + 'drawText' @@ -1276,7 +2121,7 @@ false , - + 'orientation' @@ -1285,7 +2130,16 @@ 90 , - + + + 'barHeight' + + => + + 25 + , + + 'text' @@ -1297,12 +2151,12 @@ ( ) - + ) ; - + $rendererConfig @@ -1311,37 +2165,33 @@ array ( - + 'verticalPosition' => - 'middle' + 'top' , - + 'moduleSize' => - 0.9 + 1 - + ) ; - + // create dummy Zend_Pdf object, which just stores the current page, so that we can pass it in - - - // Zend_Barcode_Renderer_Pdf->setResource() - - + $pdf @@ -1354,7 +2204,7 @@ ) ; - + $pdf -> @@ -1367,11 +2217,11 @@ $page ; - + /** @var $renderer Zend_Barcode_Renderer_Pdf */ - + $renderer @@ -1402,11 +2252,11 @@ ) ; - + // calculate left offset so that barcode is printed on the right with a little margin - + $leftOffset @@ -1444,7 +2294,7 @@ 10 ; - + $renderer -> @@ -1454,7 +2304,17 @@ ) ; - + + + $renderer + -> + setTopOffset + ( + 50 + ) + ; + + $renderer -> @@ -1463,19 +2323,19 @@ ) ; - + return $this ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Shipment.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Shipment.php.xml index 1614fee..4862f1d 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Shipment.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Shipment.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,103 +53,89 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Shipment model rewrite. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_Shipment + + extends + + Mage_Sales_Model_Order_Pdf_Shipment - + { - - + + /** - + * The actual PDF engine responsible for rendering the file. - + * - + * @var Mage_Sales_Model_Order_Pdf_Abstract - + */ - + - private + protected $_engine ; - - + + /** - + * get pdf rendering engine - + * - + * @return Mage_Sales_Model_Order_Pdf_Abstract|Mage_Sales_Model_Order_Pdf_Shipment - + */ - + protected @@ -159,11 +145,11 @@ ( ) - + { - + if @@ -176,7 +162,7 @@ { - + $modelClass @@ -190,7 +176,7 @@ ) ; - + $engine @@ -204,23 +190,35 @@ ) ; - - + + if ( ! $engine + + || + + $engine + + instanceof + + FireGento_Pdf_Model_Shipment ) { - + // Fallback to Magento standard shipment layout. - + + + // use new here to circumvent our own rewrite + + $engine @@ -233,12 +231,12 @@ ) ; - + } - - + + $this -> @@ -249,12 +247,12 @@ $engine ; - + } - - + + return @@ -263,34 +261,34 @@ _engine ; - + } - - + + /** - + * get PDF object - + * - + * @param array|Varien_Data_Collection $shipments shipments to generate pdfs for - + * - + * @return mixed - + */ - + public @@ -307,11 +305,11 @@ ) ) - + { - + return @@ -327,13 +325,13 @@ ) ; - + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xml index 857fb54..ec5869f 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -61,88 +61,87 @@ */ - - + /** - + * Class FireGento_Pdf_Model_System_Config_Backend_Font - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - + */ - + class FireGento_Pdf_Model_System_Config_Backend_Font - + extends Mage_Adminhtml_Model_System_Config_Backend_File - + { - + - private + protected $_allowedExtensions - + = array ( - + 'otf' , - + 'ttf' , - + ) ; - - + + /** - + * Returns the allowed font extensions. - + * - + * @return array containing the allowed font extensions - + */ - + protected @@ -152,11 +151,11 @@ ( ) - + { - + return @@ -165,12 +164,12 @@ _allowedExtensions ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xml index 2e49c23..2c33cfb 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,75 +53,57 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Pdf creation engine source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine - + { - + /** - + * Config xpath to pdf engine node - + * - + */ - + const @@ -132,24 +114,24 @@ 'global/pdf/firegento_creditmemo_engines' ; - - + + /** - + * Return array of possible engines. - + * - + * @return array - + */ - + public @@ -159,15 +141,15 @@ ( ) - + { - + // load default engines shipped with Mage_Sales and FireGento_Pdf - + $engines @@ -176,7 +158,7 @@ array ( - + '' @@ -195,7 +177,7 @@ ) , - + 'firegento_pdf/engine_creditmemo_default' @@ -210,20 +192,20 @@ -> __ ( - 'Standard Germany' + 'Standard FireGento' ) - + ) ; - - + + // load additional engines provided by third party extensions - + $engineNodes @@ -247,7 +229,7 @@ ) ; - + if @@ -265,7 +247,7 @@ { - + foreach @@ -287,7 +269,7 @@ { - + $className @@ -300,7 +282,7 @@ class ; - + $engineLabel @@ -323,7 +305,7 @@ ) ; - + $engines [ @@ -335,16 +317,16 @@ $engineLabel ; - + } - + } - - + + $options @@ -355,7 +337,7 @@ ) ; - + foreach @@ -373,7 +355,7 @@ { - + $options [ @@ -384,7 +366,7 @@ array ( - + 'value' @@ -393,7 +375,7 @@ $k , - + 'label' @@ -401,28 +383,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xml new file mode 100644 index 0000000..e6751f5 --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php.xml @@ -0,0 +1,288 @@ + + + + + <?php + + + /** + + + * This file is part of the FIREGENTO project. + + + * + + + * FireGento_Pdf is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2015 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Customer number source model. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2015 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + class + + FireGento_Pdf_Model_System_Config_Source_Customer_Number + + + { + + + + /** + + + * Databasefield name for customers increment_id + + + */ + + + + const + + CUSTOMER_NUMBER_FIELD_INCREMENT_ID + + = + + 'increment_id' + ; + + + + /** + + + * Return array of possible positions. + + + * + + + * @return array + + + */ + + + + public + + function + + toOptionArray + ( + ) + + + + { + + + + $selectOptions + + = + + array + ( + + + + '' + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Standard (entity_id)' + ) + , + + + + self + :: + CUSTOMER_NUMBER_FIELD_INCREMENT_ID + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + __ + ( + 'Customer Increment ID (increment_id)' + ) + + + + ) + ; + + + + $options + + = + + array + ( + ) + ; + + + + foreach + + ( + $selectOptions + + as + + $k + + => + + $v + ) + + { + + + + $options + [ + ] + + = + + array + ( + + + + 'value' + + => + + $k + , + + + + 'label' + + => + + $v + + + + ) + ; + + + + } + + + + + return + + $options + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xml index 2076343..acd4511 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,62 +53,44 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Logo position source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Headerblocks - + { - + const @@ -119,7 +101,7 @@ 'left' ; - + const @@ -130,24 +112,24 @@ 'right' ; - - + + /** - + * Return array of possible positions. - + * - + * @return array - + */ - + public @@ -157,11 +139,11 @@ ( ) - + { - + $positions @@ -170,7 +152,7 @@ array ( - + self :: @@ -191,7 +173,7 @@ ) , - + self :: @@ -212,12 +194,12 @@ ) , - + ) ; - + $options @@ -228,7 +210,7 @@ ) ; - + foreach @@ -246,7 +228,7 @@ { - + $options [ @@ -257,7 +239,7 @@ array ( - + 'value' @@ -266,7 +248,7 @@ $k , - + 'label' @@ -274,28 +256,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xml index 1fd3414..d8452d5 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,75 +53,57 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Pdf creation engine source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Invoice_Engine - + { - + /** - + * Config xpath to pdf engine node - + * - + */ - + const @@ -132,24 +114,24 @@ 'global/pdf/firegento_invoice_engines' ; - - + + /** - + * Return array of possible engines. - + * - + * @return array - + */ - + public @@ -159,15 +141,15 @@ ( ) - + { - + // load default engines shipped with Mage_Sales and FireGento_Pdf - + $engines @@ -176,7 +158,7 @@ array ( - + '' @@ -195,7 +177,7 @@ ) , - + 'firegento_pdf/engine_invoice_default' @@ -210,20 +192,20 @@ -> __ ( - 'Standard Germany' + 'Standard FireGento' ) - + ) ; - - + + // load additional engines provided by third party extensions - + $engineNodes @@ -247,7 +229,7 @@ ) ; - + if @@ -265,7 +247,7 @@ { - + foreach @@ -287,7 +269,7 @@ { - + $className @@ -300,7 +282,7 @@ class ; - + $engineLabel @@ -323,7 +305,7 @@ ) ; - + $engines [ @@ -335,16 +317,16 @@ $engineLabel ; - + } - + } - - + + $options @@ -355,7 +337,7 @@ ) ; - + foreach @@ -373,7 +355,7 @@ { - + $options [ @@ -384,7 +366,7 @@ array ( - + 'value' @@ -393,7 +375,7 @@ $k , - + 'label' @@ -401,28 +383,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xml index e9530a1..059bd65 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,62 +53,44 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Logo position source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Logo - + { - + const @@ -119,7 +101,7 @@ 'left' ; - + const @@ -130,7 +112,7 @@ 'center' ; - + const @@ -141,7 +123,7 @@ 'right' ; - + const @@ -152,24 +134,24 @@ 'full_width' ; - - + + /** - + * Return array of possible positions. - + * - + * @return array - + */ - + public @@ -179,11 +161,11 @@ ( ) - + { - + $positions @@ -192,7 +174,7 @@ array ( - + self :: @@ -213,7 +195,7 @@ ) , - + self :: @@ -234,7 +216,7 @@ ) , - + self :: @@ -255,7 +237,7 @@ ) , - + self :: @@ -275,12 +257,12 @@ 'Full width' ) - + ) ; - + $options @@ -291,7 +273,7 @@ ) ; - + foreach @@ -309,7 +291,7 @@ { - + $options [ @@ -320,7 +302,7 @@ array ( - + 'value' @@ -329,7 +311,7 @@ $k , - + 'label' @@ -337,28 +319,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xml new file mode 100644 index 0000000..8280fc9 --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php.xml @@ -0,0 +1,262 @@ + + + + + <?php + + + /** + + + * This file is part of a FireGento e.V. module. + + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2015 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + + /** + + + * Page size source model. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + + class + + FireGento_Pdf_Model_System_Config_Source_PageSize + + + { + + + + /** + + + * Return array of possible sizes. + + + * + + + * @return array + + + */ + + + + public + + function + + toOptionArray + ( + ) + + + + { + + + + $positions + + = + + array + ( + + + + Zend_Pdf_Page + :: + SIZE_A4 + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'DIN A4' + ) + , + + + + Zend_Pdf_Page + :: + SIZE_LETTER + + => + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + __ + ( + 'Letter' + ) + + + + ) + ; + + + + + $options + + = + + array + ( + ) + ; + + + + foreach + + ( + $positions + + as + + $k + + => + + $v + ) + + { + + + + $options + [ + ] + + = + + array + ( + + + + 'value' + + => + + $k + , + + + + 'label' + + => + + $v + + + + ) + ; + + + + } + + + + + return + + $options + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xml index 14ad408..c6e3d07 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,62 +53,44 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Payment method position source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Payment - + { - + const @@ -119,7 +101,7 @@ 'header' ; - + const @@ -130,24 +112,24 @@ 'note' ; - - + + /** - + * Return array of possible positions. - + * - + * @return array - + */ - + public @@ -157,11 +139,11 @@ ( ) - + { - + $positions @@ -170,7 +152,7 @@ array ( - + '' @@ -189,7 +171,7 @@ ) , - + self :: @@ -210,7 +192,7 @@ ) , - + self :: @@ -230,12 +212,12 @@ 'Notes area' ) - + ) ; - + $options @@ -246,7 +228,7 @@ ) ; - + foreach @@ -264,7 +246,7 @@ { - + $options [ @@ -275,7 +257,7 @@ array ( - + 'value' @@ -284,7 +266,7 @@ $k , - + 'label' @@ -292,28 +274,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xml index d9f0988..853661c 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,75 +53,57 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Pdf creation engine source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Shipment_Engine - + { - + /** - + * Config xpath to pdf engine node - + * - + */ - + const @@ -132,24 +114,24 @@ 'global/pdf/firegento_shipment_engines' ; - - + + /** - + * Return array of possible engines. - + * - + * @return array - + */ - + public @@ -159,15 +141,15 @@ ( ) - + { - + // load default engines shipped with Mage_Sales and FireGento_Pdf - + $engines @@ -176,7 +158,7 @@ array ( - + '' @@ -195,7 +177,7 @@ ) , - + 'firegento_pdf/engine_shipment_default' @@ -210,20 +192,20 @@ -> __ ( - 'Standard Germany' + 'Standard FireGento' ) - + ) ; - - + + // load additional engines provided by third party extensions - + $engineNodes @@ -247,7 +229,7 @@ ) ; - + if @@ -265,7 +247,7 @@ { - + foreach @@ -287,7 +269,7 @@ { - + $className @@ -300,7 +282,7 @@ class ; - + $engineLabel @@ -323,7 +305,7 @@ ) ; - + $engines [ @@ -335,16 +317,16 @@ $engineLabel ; - + } - + } - - + + $options @@ -355,7 +337,7 @@ ) ; - + foreach @@ -373,7 +355,7 @@ { - + $options [ @@ -384,7 +366,7 @@ array ( - + 'value' @@ -393,7 +375,7 @@ $k , - + 'label' @@ -401,28 +383,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xml index 8cf0fc5..bcbc217 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,62 +53,44 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - + /** - + * Shipping method position source model. - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Model_System_Config_Source_Shipping - + { - + const @@ -119,7 +101,7 @@ 'header' ; - + const @@ -130,24 +112,24 @@ 'note' ; - - + + /** - + * Return array of possible positions. - + * - + * @return array - + */ - + public @@ -157,11 +139,11 @@ ( ) - + { - + $positions @@ -170,7 +152,7 @@ array ( - + '' @@ -189,7 +171,7 @@ ) , - + self :: @@ -210,7 +192,7 @@ ) , - + self :: @@ -230,12 +212,12 @@ 'Notes area' ) - + ) ; - + $options @@ -246,7 +228,7 @@ ) ; - + foreach @@ -264,7 +246,7 @@ { - + $options [ @@ -275,7 +257,7 @@ array ( - + 'value' @@ -284,7 +266,7 @@ $k , - + 'label' @@ -292,28 +274,29 @@ $v - + ) ; - + } - + + return $options ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xml index b10ac1e..687fe3b 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -80,21 +80,9 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - */ - + class FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal @@ -103,11 +91,11 @@ Mage_Tax_Model_Sales_Pdf_Grandtotal - + { - - + + const @@ -118,7 +106,7 @@ 'tax/sales_display/no_sum_on_details' ; - + const @@ -129,45 +117,45 @@ 'tax/sales_display/hide_grandtotal_excl_tax' ; - - + + /** - + * Check if tax amount should be included to grandtotals block - + * array( - + * $index => array( - + * 'amount' => $amount, - + * 'label' => $label, - + * 'font_size'=> $font_size - + * ) - + * ) - + * - + * @return array - + */ - + public @@ -177,11 +165,11 @@ ( ) - + { - + $store @@ -198,7 +186,7 @@ ) ; - + $config @@ -212,7 +200,7 @@ ) ; - + $noDisplaySumOnDetails @@ -231,7 +219,7 @@ ) ; - + $hideGrandTotalExclTax @@ -250,7 +238,7 @@ ) ; - + if @@ -266,7 +254,7 @@ { - + return @@ -277,11 +265,12 @@ ) ; - + } - + + $amount @@ -303,7 +292,7 @@ ) ; - + $amountExclTax @@ -328,7 +317,7 @@ ) ; - + $amountExclTax @@ -351,7 +340,7 @@ 0 ; - + $amountExclTax @@ -369,7 +358,7 @@ ) ; - + $tax @@ -395,7 +384,7 @@ ) ; - + $fontSize @@ -420,8 +409,8 @@ 7 ; - - + + $totals @@ -432,7 +421,7 @@ ) ; - + if @@ -443,7 +432,7 @@ { - + $totals [ @@ -454,7 +443,7 @@ array ( - + 'amount' @@ -471,7 +460,7 @@ $amountExclTax , - + 'label' @@ -494,7 +483,7 @@ ':' , - + 'font_size' @@ -502,36 +491,36 @@ $fontSize - + ) ; - + } - - + + /** - + * if display_sales_full_summary = 1 - + * display each tax group - + * if no_sum_on_details is = 1 display tax total additionally - + * else display only tax total - + */ - + if @@ -546,7 +535,7 @@ { - + $totals @@ -565,7 +554,7 @@ ) ; - + if @@ -576,7 +565,7 @@ { - + $totals [ @@ -587,7 +576,7 @@ array ( - + 'amount' @@ -604,7 +593,7 @@ $tax , - + 'label' @@ -627,7 +616,7 @@ ':' , - + 'font_size' @@ -635,16 +624,16 @@ $fontSize - + ) ; - + } - + } @@ -652,7 +641,7 @@ { - + $totals [ @@ -663,7 +652,7 @@ array ( - + 'amount' @@ -680,7 +669,7 @@ $tax , - + 'label' @@ -703,7 +692,7 @@ ':' , - + 'font_size' @@ -711,17 +700,17 @@ $fontSize - + ) ; - + } - - + + $totals [ @@ -732,7 +721,7 @@ array ( - + 'amount' @@ -749,7 +738,7 @@ $amount , - + 'label' @@ -772,7 +761,7 @@ ':' , - + 'font_size' @@ -780,24 +769,24 @@ $fontSize - + ) ; - + return $totals ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xml index ac200b6..94ab706 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php.xml @@ -1,12 +1,88 @@ - + <?php - - + + /** + + + * This file is part of a FireGento e.V. module. + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Test class for creditmemos. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + class FireGento_Pdf_Test_Model_CreditmemoTest @@ -15,24 +91,24 @@ FireGento_Pdf_Test_Model_SalesObjectTestAbstract - + { - + protected - $class + $_class = 'FireGento_Pdf_Model_Creditmemo' ; - + - + public @@ -42,25 +118,25 @@ ( ) - + { - + return 'sales_pdf/creditmemo/engine' ; - + } - + - + public @@ -70,23 +146,23 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Pdf_Creditmemo' ; - + } - - + + public @@ -96,23 +172,23 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Creditmemo' ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xml index 2c07dce..e37bfc1 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php.xml @@ -1,12 +1,88 @@ - + <?php - - + + /** + + + * This file is part of a FireGento e.V. module. + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Test class for invoices. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + class FireGento_Pdf_Test_Model_InvoiceTest @@ -15,24 +91,24 @@ FireGento_Pdf_Test_Model_SalesObjectTestAbstract - + { - + protected - $class + $_class = 'FireGento_Pdf_Model_Invoice' ; - + - + public @@ -42,25 +118,25 @@ ( ) - + { - + return 'sales_pdf/invoice/engine' ; - + } - + - + public @@ -70,23 +146,23 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Pdf_Invoice' ; - + } - - + + public @@ -96,23 +172,23 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Invoice' ; - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xml index e1ae6b8..6f6f9a0 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php.xml @@ -1,50 +1,126 @@ - + <?php - - + + /** + + + * This file is part of a FireGento e.V. module. + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Abstract test class for the different engines. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + abstract class FireGento_Pdf_Test_Model_SalesObjectTestAbstract - + extends EcomDev_PHPUnit_Test_Case - + { - + protected - $class + $_class = '' ; - - + + /** - + * @test - + */ - + public @@ -54,11 +130,11 @@ ( ) - + { - + $this -> @@ -68,30 +144,30 @@ ( $this -> - class + _class ) ) ; - + } - - + + /** - + * @test - + * @depends itShouldExist - + */ - + public @@ -101,17 +177,17 @@ ( ) - + { - + try { - + new @@ -119,14 +195,14 @@ ( $this -> - class + _class , 'getEngine' ) ; - + } @@ -140,7 +216,7 @@ { - + $this -> @@ -154,21 +230,23 @@ ) ; - + } - + } - + - + abstract + public + function getEngineXmlConfigPath @@ -176,13 +254,15 @@ ) ; - + - + abstract + public + function getExpectedDefaultEngineClass @@ -190,8 +270,8 @@ ) ; - - + + abstract @@ -204,21 +284,21 @@ ) ; - - + + /** - + * @test - + * @depends itShouldHaveAMethodGetEngine - + */ - + public @@ -228,14 +308,14 @@ ( ) - + { - + - $this - -> + static + :: app ( ) @@ -257,7 +337,7 @@ ) ; - + $instance @@ -267,10 +347,10 @@ $this -> - class + _class ; - + $result @@ -287,7 +367,7 @@ ) ; - + $this -> @@ -304,25 +384,25 @@ ) ; - + } - - + + /** - + * @test - + * @depends itShouldExist - + */ - + public @@ -332,11 +412,11 @@ ( ) - + { - + $instance @@ -346,10 +426,10 @@ $this -> - class + _class ; - + $this -> @@ -368,25 +448,25 @@ ) ; - + } - - + + /** - + * @test - + * @depends itShouldhaveAMethodGetPdf - + */ - + public @@ -396,11 +476,11 @@ ( ) - + { - + $instance @@ -410,13 +490,11 @@ $this -> - class + _class ; - - - - + + $mockAddress @@ -430,8 +508,8 @@ ) ; - - + + $mockPaymentMethod @@ -439,16 +517,49 @@ $this -> - getMockForAbstractClass + getMock ( 'Mage_Payment_Model_Method_Abstract' ) ; - + + $mockPaymentMethod + -> + expects + ( + $this + -> + any + ( + ) + ) - + + + -> + method + ( + 'getInfoBlockType' + ) + + + + -> + will + ( + $this + -> + returnValue + ( + 'payment/info' + ) + ) + ; + + + $mockPaymentInfo @@ -462,7 +573,7 @@ ) ; - + $mockPaymentInfo -> @@ -475,7 +586,7 @@ ) ) - + -> method @@ -483,7 +594,7 @@ 'getMethodInstance' ) - + -> will @@ -497,8 +608,8 @@ ) ; - - + + $mockOrder @@ -512,7 +623,7 @@ ) ; - + $mockOrder -> @@ -525,7 +636,7 @@ ) ) - + -> method @@ -533,7 +644,7 @@ 'getBillingAddress' ) - + -> will @@ -547,7 +658,7 @@ ) ; - + $mockOrder -> @@ -560,7 +671,7 @@ ) ) - + -> method @@ -568,7 +679,7 @@ 'getShippingAddress' ) - + -> will @@ -582,10 +693,8 @@ ) ; - - - - + + $mockOrder -> @@ -598,7 +707,7 @@ ) ) - + -> method @@ -606,7 +715,7 @@ 'getPayment' ) - + -> will @@ -620,10 +729,10 @@ ) ; - + - + $mockObj @@ -640,14 +749,14 @@ ) ) - + -> disableOriginalConstructor ( ) - + -> getMock @@ -655,7 +764,7 @@ ) ; - + $mockObj -> @@ -668,7 +777,7 @@ ) ) - + -> method @@ -676,7 +785,7 @@ 'getOrder' ) - + -> will @@ -690,7 +799,7 @@ ) ; - + $mockObj -> @@ -703,7 +812,7 @@ ) ) - + -> method @@ -711,7 +820,7 @@ 'getAllItems' ) - + -> will @@ -727,10 +836,39 @@ ) ; - + + + + $currentArea + + = + + Mage + :: + getDesign + ( + ) + -> + getArea + ( + ) + ; + + + Mage + :: + getDesign + ( + ) + -> + setArea + ( + 'adminhtml' + ) + ; - + $result @@ -747,7 +885,21 @@ ) ; - + + + Mage + :: + getDesign + ( + ) + -> + setArea + ( + $currentArea + ) + ; + + $this -> @@ -760,13 +912,13 @@ ) ; - + } - - - + + + protected @@ -789,11 +941,11 @@ null ) - + { - + $method @@ -810,7 +962,7 @@ ) ; - + $method -> @@ -820,7 +972,7 @@ ) ; - + if @@ -833,7 +985,7 @@ { - + return @@ -848,7 +1000,7 @@ ) ; - + } @@ -856,7 +1008,7 @@ { - + return @@ -868,16 +1020,16 @@ ) ; - + } - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xml index 001d9bd..34823c7 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php.xml @@ -1,12 +1,88 @@ - + <?php - - + + /** + + + * This file is part of a FireGento e.V. module. + + * + + + * This FireGento e.V. module is free software; you can redistribute it and/or + + + * modify it under the terms of the GNU General Public License version 3 as + + + * published by the Free Software Foundation. + + + * + + + * This script is distributed in the hope that it will be useful, but WITHOUT + + + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + + + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + + * + + + * PHP version 5 + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + * @copyright 2014 FireGento Team (http://www.firegento.com) + + + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + + + */ + + + /** + + + * Test class for shipments. + + + * + + + * @category FireGento + + + * @package FireGento_Pdf + + + * @author FireGento Team <team@firegento.com> + + + */ + + class FireGento_Pdf_Test_Model_ShipmentTest @@ -15,22 +91,22 @@ FireGento_Pdf_Test_Model_SalesObjectTestAbstract - + { - + protected - $class + $_class = 'FireGento_Pdf_Model_Shipment' ; - - + + public @@ -40,23 +116,23 @@ ( ) - + { - + return - 'sales_pdf/invoice/shipment' + 'sales_pdf/shipment/engine' ; - + } - - + + public @@ -66,25 +142,25 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Pdf_Shipment' ; - + } - + - + public @@ -94,22 +170,23 @@ ( ) - + { - + return 'Mage_Sales_Model_Order_Shipment' ; - + } - + } + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xml new file mode 100644 index 0000000..048819f --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php.xml @@ -0,0 +1,416 @@ + + + + + <?php + + + + require + ( + 'Mage/Adminhtml/controllers/Sales/CreditmemoController.php' + ) + ; + + + + class + + FireGento_Pdf_Adminhtml_Sales_CreditmemoController + + + + extends + + Mage_Adminhtml_Sales_CreditmemoController + + + { + + + + public + + function + + pdfcreditmemosAction + ( + ) + + + + { + + + + $creditmemosIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'creditmemo_ids' + ) + ; + + + + if + + ( + count + ( + $creditmemosIds + ) + + > + + 1 + ) + + { + + + + $invoices + + = + + Mage + :: + getResourceModel + ( + 'sales/order_creditmemo_collection' + ) + + + + -> + addAttributeToSelect + ( + '*' + ) + + + + -> + addAttributeToFilter + ( + 'entity_id' + , + + array + ( + 'in' + + => + + $creditmemosIds + ) + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_creditmemo' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_creditmemo' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'creditmemo' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + if + + ( + count + ( + $creditmemosIds + ) + + == + + 1 + ) + + { + + + + $creditmemoId + + = + + $creditmemosIds + [ + 0 + ] + ; + + + + if + + ( + $invoice + + = + + Mage + :: + getModel + ( + 'sales/order_creditmemo' + ) + + + + -> + load + ( + $creditmemoId + ) + + + + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_creditmemo' + ) + + + + -> + getPdf + ( + array + ( + $invoice + ) + ) + ; + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'creditmemo' + , + + $invoice + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xml new file mode 100644 index 0000000..7c8045d --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php.xml @@ -0,0 +1,416 @@ + + + + + <?php + + + + require + ( + 'Mage/Adminhtml/controllers/Sales/InvoiceController.php' + ) + ; + + + + class + + FireGento_Pdf_Adminhtml_Sales_InvoiceController + + + + extends + + Mage_Adminhtml_Sales_InvoiceController + + + { + + + + public + + function + + pdfinvoicesAction + ( + ) + + + + { + + + + $invoicesIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'invoice_ids' + ) + ; + + + + if + + ( + count + ( + $invoicesIds + ) + + > + + 1 + ) + + { + + + + $invoices + + = + + Mage + :: + getResourceModel + ( + 'sales/order_invoice_collection' + ) + + + + -> + addAttributeToSelect + ( + '*' + ) + + + + -> + addAttributeToFilter + ( + 'entity_id' + , + + array + ( + 'in' + + => + + $invoicesIds + ) + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_invoice' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_invoice' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'invoice' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + if + + ( + count + ( + $invoicesIds + ) + + == + + 1 + ) + + { + + + + $invoiceId + + = + + $invoicesIds + [ + 0 + ] + ; + + + + if + + ( + $invoice + + = + + Mage + :: + getModel + ( + 'sales/order_invoice' + ) + + + + -> + load + ( + $invoiceId + ) + + + + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_invoice' + ) + + + + -> + getPdf + ( + array + ( + $invoice + ) + ) + ; + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'invoice' + , + + $invoice + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xml index 315cea6..a8dc3ec 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) @@ -61,61 +61,62 @@ */ - + + require ( 'Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php' ) ; - - + + /** - + * Class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - + */ - + class FireGento_Pdf_Adminhtml_Sales_Order_CreditmemoController - + extends Mage_Adminhtml_Sales_Order_CreditmemoController - + { - - + + /** - + * Create pdf for current creditmemo - + */ - + public @@ -125,11 +126,11 @@ ( ) - + { - + $this -> @@ -138,11 +139,11 @@ ) ; - + /** @see Mage_Adminhtml_Sales_Order_InvoiceController */ - + if @@ -165,7 +166,7 @@ { - + if @@ -181,7 +182,7 @@ 'sales/order_creditmemo' ) - + -> load @@ -189,13 +190,13 @@ $creditmemoId ) - + ) { - + $pdf @@ -208,7 +209,7 @@ 'sales/order_pdf_creditmemo' ) - + -> getPdf @@ -220,14 +221,14 @@ ) ; - + $this -> _prepareDownloadResponse ( - + Mage :: @@ -236,7 +237,7 @@ 'firegento_pdf' ) - + -> getExportFilename @@ -248,7 +249,7 @@ ) , - + $pdf -> @@ -259,16 +260,16 @@ 'application/pdf' - + ) ; - + } - + } @@ -276,7 +277,7 @@ { - + $this -> @@ -286,17 +287,17 @@ ) ; - + } - + } - - + + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xml index 4c35e85..73ca3fb 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xml index e8dff30..9457152 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -53,7 +53,7 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xml new file mode 100644 index 0000000..2c7f4e4 --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php.xml @@ -0,0 +1,1419 @@ + + + + + <?php + + + + require + ( + 'Mage/Adminhtml/controllers/Sales/OrderController.php' + ) + ; + + + + class + + FireGento_Pdf_Adminhtml_Sales_OrderController + + + + extends + + Mage_Adminhtml_Sales_OrderController + + + { + + + + public + + function + + pdfinvoicesAction + ( + ) + + + + { + + + + $orderIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'order_ids' + ) + ; + + + + $flag + + = + + false + ; + + + + if + + ( + ! + empty + ( + $orderIds + ) + ) + + { + + + + $invoice + + = + + null + ; + + + + foreach + + ( + $orderIds + + as + + $orderId + ) + + { + + + + $invoices + + = + + Mage + :: + getResourceModel + ( + 'sales/order_invoice_collection' + ) + + + + -> + setOrderFilter + ( + $orderId + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + $invoices + -> + getSize + ( + ) + + == + + 1 + ) + + { + + + + $invoice + + = + + $invoices + -> + getFirstItem + ( + ) + ; + + + + } + + + + + if + + ( + $invoices + -> + getSize + ( + ) + + > + + 0 + ) + + { + + + + $flag + + = + + true + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_invoice' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_invoice' + ) + -> + getPdf + ( + $invoices + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + // there is more than one invoice + + + + $invoice + + = + + null + ; + + + + } + + + + } + + + + } + + + + + if + + ( + $flag + ) + + { + + + + if + + ( + $invoice + + != + + null + ) + + { + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'invoice' + , + + $invoice + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'invoice' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + { + + + + $this + -> + _getSession + ( + ) + -> + addError + ( + + + + $this + -> + __ + ( + 'There are no printable documents related to selected orders.' + ) + + + + ) + ; + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + + + public + + function + + pdfshipmentsAction + ( + ) + + + + { + + + + $orderIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'order_ids' + ) + ; + + + + $flag + + = + + false + ; + + + + if + + ( + ! + empty + ( + $orderIds + ) + ) + + { + + + + $shipment + + = + + null + ; + + + + foreach + + ( + $orderIds + + as + + $orderId + ) + + { + + + + $shipments + + = + + Mage + :: + getResourceModel + ( + 'sales/order_shipment_collection' + ) + + + + -> + setOrderFilter + ( + $orderId + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + $shipments + -> + getSize + ( + ) + + == + + 1 + ) + + { + + + + $shipment + + = + + $shipments + -> + getFirstItem + ( + ) + ; + + + + } + + + + + if + + ( + $shipments + -> + getSize + ( + ) + + > + + 0 + ) + + { + + + + $flag + + = + + true + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_shipment' + ) + -> + getPdf + ( + $shipments + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_shipment' + ) + -> + getPdf + ( + $shipments + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + // there is more than one invoice + + + + $shipment + + = + + null + ; + + + + } + + + + } + + + + } + + + + + if + + ( + $flag + ) + + { + + + + if + + ( + $shipment + + != + + null + ) + + { + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'shipment' + , + + $shipment + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'shipment' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + { + + + + $this + -> + _getSession + ( + ) + -> + addError + ( + + + + $this + -> + __ + ( + 'There are no printable documents related to selected orders.' + ) + + + + ) + ; + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + + + public + + function + + pdfcreditmemosAction + ( + ) + + + + { + + + + $orderIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'order_ids' + ) + ; + + + + $flag + + = + + false + ; + + + + if + + ( + ! + empty + ( + $orderIds + ) + ) + + { + + + + $creditmemo + + = + + null + ; + + + + foreach + + ( + $orderIds + + as + + $orderId + ) + + { + + + + $creditmemos + + = + + Mage + :: + getResourceModel + ( + 'sales/order_creditmemo_collection' + ) + + + + -> + setOrderFilter + ( + $orderId + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + $creditmemos + -> + getSize + ( + ) + + == + + 1 + ) + + { + + + + $creditmemo + + = + + $creditmemos + -> + getFirstItem + ( + ) + ; + + + + } + + + + + if + + ( + $creditmemos + -> + getSize + ( + ) + + > + + 0 + ) + + { + + + + $flag + + = + + true + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_creditmemo' + ) + -> + getPdf + ( + $creditmemos + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_creditmemo' + ) + -> + getPdf + ( + $creditmemos + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + // there is more than one invoice + + + + $creditmemo + + = + + null + ; + + + + } + + + + } + + + + } + + + + + if + + ( + $flag + ) + + { + + + + if + + ( + $creditmemo + + != + + null + ) + + { + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'creditmemo' + , + + $creditmemo + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'creditmemo' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + { + + + + $this + -> + _getSession + ( + ) + -> + addError + ( + + + + $this + -> + __ + ( + 'There are no printable documents related to selected orders.' + ) + + + + ) + ; + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xml new file mode 100644 index 0000000..140195d --- /dev/null +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php.xml @@ -0,0 +1,416 @@ + + + + + <?php + + + + require + ( + 'Mage/Adminhtml/controllers/Sales/ShipmentController.php' + ) + ; + + + + class + + FireGento_Pdf_Adminhtml_Sales_ShipmentController + + + + extends + + Mage_Adminhtml_Sales_ShipmentController + + + { + + + + public + + function + + pdfshipmentsAction + ( + ) + + + + { + + + + $shipmentIds + + = + + $this + -> + getRequest + ( + ) + -> + getPost + ( + 'shipment_ids' + ) + ; + + + + if + + ( + count + ( + $shipmentIds + ) + + > + + 1 + ) + + { + + + + $shipments + + = + + Mage + :: + getResourceModel + ( + 'sales/order_shipment_collection' + ) + + + + -> + addAttributeToSelect + ( + '*' + ) + + + + -> + addAttributeToFilter + ( + 'entity_id' + , + + array + ( + 'in' + + => + + $shipmentIds + ) + ) + + + + -> + load + ( + ) + ; + + + + if + + ( + ! + isset + ( + $pdf + ) + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_shipment' + ) + -> + getPdf + ( + $shipments + ) + ; + + + + } + + else + + { + + + + $pages + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_shipment' + ) + -> + getPdf + ( + $shipments + ) + ; + + + + $pdf + -> + pages + + = + + array_merge + ( + $pdf + -> + pages + , + + $pages + -> + pages + ) + ; + + + + } + + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilenameForMultipleDocuments + ( + 'shipment' + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + else + + if + + ( + count + ( + $shipmentIds + ) + + == + + 1 + ) + + { + + + + $shipmentId + + = + + $shipmentIds + [ + 0 + ] + ; + + + + if + + ( + $shipment + + = + + Mage + :: + getModel + ( + 'sales/order_shipment' + ) + + + + -> + load + ( + $shipmentId + ) + + + + ) + + { + + + + $pdf + + = + + Mage + :: + getModel + ( + 'sales/order_pdf_shipment' + ) + + + + -> + getPdf + ( + array + ( + $shipment + ) + ) + ; + + + + return + + $this + -> + _prepareDownloadResponse + ( + + + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + 'shipment' + , + + $shipment + ) + , + + + + $pdf + -> + render + ( + ) + , + + 'application/pdf' + + + + ) + ; + + + + } + + + + } + + + + + $this + -> + _redirect + ( + '*/*/' + ) + ; + + + + } + + + } + + + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xml index 5cbbf51..03bc2e9 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,62 +53,44 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - - + + require_once 'Mage/Sales/controllers/OrderController.php' ; - - + + /** - + * Sales orders controller - + * - + * @category FireGento - + * @package FireGento_Pdf - + * @author FireGento Team <team@firegento.com> - - * @copyright 2013 FireGento Team (http://www.firegento.com) - - - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - - - * @version $Id:$ - - - * @since 0.1.0 - - + */ - + class FireGento_Pdf_Sales_OrderController @@ -117,23 +99,23 @@ Mage_Sales_OrderController - + { - + protected $_types - + = array ( - + 'invoice' , @@ -143,35 +125,35 @@ 'shipment' - + ) ; - - + + /** - + * Print PDF Invoice Action - + * - + * it changes the standard action with html output to pdf output - + * - + * @return void - + */ - + public @@ -181,11 +163,11 @@ ( ) - + { - + $this -> @@ -195,35 +177,35 @@ ) ; - + } - - + + /** - + * Print PDF Creditmemo action - + * - + * it changes the standard action with html output to pdf output - + * - + * @return void - + */ - - + + public @@ -233,11 +215,11 @@ ( ) - + { - + $this -> @@ -247,34 +229,34 @@ ) ; - + } - - + + /** - + * Print PDF Shipment Action - + * - + * it changes the standard action with html output to pdf output - + * - + * @return void - + */ - + public @@ -284,11 +266,11 @@ ( ) - + { - + $this -> @@ -298,28 +280,28 @@ ) ; - + } - - + + /** - + * Create invoice, creditmemo or shipment pdf - + * - + * @param string $type which document should be created? invoice, creditmemo or shipment - + */ - + public @@ -330,11 +312,11 @@ $type ) - + { - + if @@ -353,7 +335,7 @@ { - + Mage :: @@ -363,15 +345,16 @@ ) ; - + } - + + /* @var $order Mage_Sales_Model_Order */ - + $documentId @@ -394,7 +377,7 @@ ) ; - + $document @@ -403,7 +386,7 @@ null ; - + if @@ -413,11 +396,11 @@ { - + /* @var $document Mage_Sales_Model_Abstract */ - + $document @@ -435,7 +418,7 @@ ) ; - + $document -> @@ -445,7 +428,7 @@ ) ; - + $order @@ -458,7 +441,7 @@ ) ; - + } @@ -466,7 +449,7 @@ { - + $orderId @@ -485,7 +468,7 @@ ) ; - + $order @@ -504,12 +487,12 @@ ) ; - + } - - + + if @@ -524,7 +507,7 @@ { - + if @@ -537,15 +520,15 @@ { - + // Create a pdf file from all $type s of requested order. - + /* @var $documentsCollection Mage_Sales_Model_Resource_Order_Collection_Abstract */ - + $documentsCollection @@ -567,11 +550,11 @@ ) ; - + $documentsCollection - + -> addAttributeToSelect @@ -579,7 +562,7 @@ '*' ) - + -> addAttributeToFilter @@ -590,7 +573,7 @@ $orderId ) - + -> load @@ -598,7 +581,84 @@ ) ; + + + if + + ( + count + ( + $documentsCollection + ) + + == + + 1 + ) + + { + + + + $filename + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + + + + -> + getExportFilename + ( + $type + , + + $documentsCollection + -> + getFirstItem + ( + ) + ) + ; + + + + } + + else + + { + + + + $filename + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + getExportFilenameForMultipleDocuments + ( + $type + ) + ; + + + } + + } @@ -606,11 +666,11 @@ { - + // Create a single $type pdf. - + $documentsCollection @@ -622,16 +682,38 @@ ) ; - + + + $filename + + = + + Mage + :: + helper + ( + 'firegento_pdf' + ) + -> + getExportFilename + ( + $type + , + + $document + ) + ; + + } - - + + // Store current area and set to adminhtml for $type generation. - + $currentArea @@ -648,7 +730,7 @@ ) ; - + Mage :: @@ -662,12 +744,12 @@ ) ; - - + + /* @var $pdfGenerator Mage_Sales_Model_Order_Pdf_Abstract */ - + $pdfGenerator @@ -685,7 +767,7 @@ ) ; - + $pdf @@ -699,29 +781,16 @@ ) ; - + $this -> _prepareDownloadResponse ( - + - Mage - :: - helper - ( - 'firegento_pdf' - ) - -> - getExportFilename - ( - $type - , - - $document - ) + $filename , $pdf @@ -733,17 +802,17 @@ 'application/pdf' - + ) ; - - + + // Restore area. - + Mage :: @@ -757,8 +826,7 @@ ) ; - - + } @@ -766,7 +834,7 @@ { - + if @@ -785,7 +853,7 @@ { - + $this -> @@ -795,7 +863,7 @@ ) ; - + } @@ -803,7 +871,7 @@ { - + $this -> @@ -813,20 +881,20 @@ ) ; - + } - + } - + } - + } - + diff --git a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xml b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xml index 649763a..6b516eb 100644 --- a/docs/api/xml/tokens/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xml +++ b/docs/api/xml/tokens/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php.xml @@ -1,6 +1,6 @@ - + <?php @@ -8,13 +8,13 @@ /** - * This file is part of the FIREGENTO project. + * This file is part of a FireGento e.V. module. * - * FireGento_Pdf is free software; you can redistribute it and/or + * This FireGento e.V. module is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 3 as @@ -53,25 +53,19 @@ * @author FireGento Team <team@firegento.com> - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - - - * @since 0.1.0 - - */ - - + + /* @var $this Mage_Eav_Model_Entity_Setup */ - + $installer = @@ -79,7 +73,7 @@ $this ; - + $installer -> startSetup @@ -87,8 +81,8 @@ ) ; - - + + $installer -> deleteConfigData @@ -97,8 +91,8 @@ ) ; - - + + $installer -> endSetup @@ -106,5 +100,5 @@ ) ; - + diff --git a/modman b/modman index 7c60b2a..eae0a9f 100644 --- a/modman +++ b/modman @@ -3,3 +3,4 @@ src/app/etc/modules/FireGento_Pdf.xml app/etc/modules/FireGento_Pdf.xml src/app/locale/de_DE/* app/locale/de_DE/ src/app/locale/de_AT/* app/locale/de_AT/ src/app/locale/nl_NL/* app/locale/nl_NL/ +src/app/locale/fr_FR/* app/locale/fr_FR/ diff --git a/phpdox.xml b/phpdox.xml index 80160b0..4db30ea 100644 --- a/phpdox.xml +++ b/phpdox.xml @@ -1,5 +1,5 @@ - + diff --git a/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php index 04a0c7d..c30bcff 100644 --- a/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php +++ b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/ColumnOrder.php @@ -15,17 +15,15 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ /** - * Firegento + * Block which enables the user to change the column order in the admin via drag & drop. * * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ class Firegento_Pdf_Block_Adminhtml_ColumnOrder extends Mage_Adminhtml_Block_System_Config_Form_Field @@ -121,7 +119,7 @@ protected function _getSortableListHtml(Varien_Data_Form_Element_Abstract $eleme } $this->_addListItems($activeItems); - $this->_sortableListHtml .= '
                                                                        • + $this->_sortableListHtml .= '

                                                                        • ' . $this->__('not to be listed') . ' @@ -142,13 +140,14 @@ protected function _addListItems($items) { foreach ($items as $name=>$item) { $this->_sortableListHtml .= sprintf( - '
                                                                        • %s
                                                                        • ', + '
                                                                        • %s
                                                                        • ', $name, $name, $item['width'], $item['label'] ); } + return $this; } } diff --git a/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php new file mode 100644 index 0000000..f993590 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes.php @@ -0,0 +1,62 @@ +_countryRenderer) { + $this->_countryRenderer = $this->getLayout()->createBlock( + 'firegento_pdf/adminhtml_system_config_form_field_notes_country', '', + array('is_render_to_js_template' => true) + ); + } + + return $this->_countryRenderer; + } + + /** + * Add columns, change button labels etc. + */ + protected function _prepareToRender() + { + $this->addColumn( + 'country', array( + 'label' => Mage::helper('firegento_pdf')->__('Shipping Country'), + 'renderer' => $this->_getCountryRenderer() + ) + ); + $this->addColumn( + 'note', array( + 'label' => Mage::helper('firegento_pdf')->__('Note') + ) + ); + $this->_addButtonLabel = Mage::helper('firegento_pdf')->__('Add Note'); + $this->_addAfter = false; + } + + /** + * Prepare existing row data object + * + * @param Varien_Object + */ + protected function _prepareArrayRow(Varien_Object $row) + { + $row->setData( + 'option_extra_attr_' . $this->_getCountryRenderer()->calcOptionHash($row->getData('country')), + 'selected="selected"' + ); + } + +} diff --git a/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php new file mode 100644 index 0000000..c84f7fa --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Block/Adminhtml/System/Config/Form/Field/Notes/Country.php @@ -0,0 +1,37 @@ +setName($value); + } + + /** + * Render block HTML + * + * @return string + */ + public function _toHtml() + { + if (!$this->getOptions()) { + $countryModel = Mage::getModel('adminhtml/system_config_source_country'); + foreach ($countryModel->toOptionArray() as $country) { + $this->addOption($country['value'], $country['label']); + } + } + + return parent::_toHtml(); + } + +} diff --git a/src/app/code/community/FireGento/Pdf/Helper/Data.php b/src/app/code/community/FireGento/Pdf/Helper/Data.php index e8621f0..fdbd6d4 100644 --- a/src/app/code/community/FireGento/Pdf/Helper/Data.php +++ b/src/app/code/community/FireGento/Pdf/Helper/Data.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** @@ -27,10 +25,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Helper_Data extends Mage_Core_Helper_Abstract { @@ -38,9 +32,24 @@ class FireGento_Pdf_Helper_Data extends Mage_Core_Helper_Abstract const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_NUMBER = 'sales_pdf/invoice/show_customer_number'; const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_NUMBER = 'sales_pdf/shipment/show_customer_number'; const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/show_customer_number'; + const XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/invoice/show_customer_vatnumber'; + const XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/shipment/show_customer_vatnumber'; + const XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER = 'sales_pdf/creditmemo/show_customer_vatnumber'; + const XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/invoice/guestorder_customer_number'; + const XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/shipment/guestorder_customer_number'; + const XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER = 'sales_pdf/creditmemo/guestorder_customer_number'; const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN = 'sales_pdf/invoice/filename_export_pattern'; const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN = 'sales_pdf/shipment/filename_export_pattern'; const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN = 'sales_pdf/creditmemo/filename_export_pattern'; + const XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/invoice/filename_export_pattern_for_multiple_documents'; + const XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/shipment/filename_export_pattern_for_multiple_documents'; + const XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS = 'sales_pdf/creditmemo/filename_export_pattern_for_multiple_documents'; + const XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE = 'sales_pdf/firegento_pdf/page_size'; + + const XML_PATH_COLOR_TEXT = 'sales_pdf/firegento_pdf_colors/text'; + const XML_PATH_COLOR_LABELS = 'sales_pdf/firegento_pdf_colors/labels'; + const XML_PATH_COLOR_TABLE_HEADER = 'sales_pdf/firegento_pdf_colors/table_header'; + const XML_PATH_COLOR_FOOTER = 'sales_pdf/firegento_pdf_colors/footer'; const XML_PATH_REGULAR_FONT = 'sales_pdf/firegento_pdf_fonts/regular_font'; const XML_PATH_BOLD_FONT = 'sales_pdf/firegento_pdf_fonts/bold_font'; @@ -89,6 +98,7 @@ public function putOrderId(Mage_Sales_Model_Order $order, $mode = 'invoice') } break; } + return false; } @@ -105,6 +115,7 @@ public function isLogoFullWidth($store) self::XML_PATH_FIREGENTO_PDF_LOGO_POSITION, $store ); $fullWidth = FireGento_Pdf_Model_System_Config_Source_Logo::FULL_WIDTH; + return $configSetting == $fullWidth; } @@ -116,7 +127,7 @@ public function isLogoFullWidth($store) * * @return bool whether the customer number should be shown */ - public function showCustomerNumber($mode = 'invoice', $store) + public function showCustomerNumber($mode = 'invoice', $store = null) { switch ($mode) { case 'invoice': @@ -135,6 +146,75 @@ public function showCustomerNumber($mode = 'invoice', $store) $store ); } + + return true; // backwards compatibility + } + + /** + * Whether the customer VAT number should be shown. + * + * @param string $mode the mode of this document like invoice, shipment or creditmemo + * @param mixed $store store to get information from + * + * @return bool whether the customer number should be shown + */ + public function showCustomerVATNumber($mode = 'invoice', $store = null) + { + switch ($mode) { + case 'invoice': + return Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_INVOICE_SHOW_CUSTOMER_VATNUMBER, + $store + ); + case 'shipment': + return Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_SHIPMENT_SHOW_CUSTOMER_VATNUMBER, + $store + ); + case 'creditmemo': + return Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_CREDITMEMO_SHOW_CUSTOMER_VATNUMBER, + $store + ); + } + + return true; // backwards compatibility + } + + /** + * Get customer number for guest orders. + * + * @param string $mode the mode of this document like invoice, shipment or creditmemo + * @param mixed $store store to get information from + * + * @return string customer number for guest orders + */ + public function getGuestorderCustomerNo($mode = 'invoice', $store = null) + { + switch ($mode) { + case 'invoice': + return trim( + Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_INVOICE_GUEST_ORDER_CUSTOMER_NUMBER, + $store + ) + ); + case 'shipment': + return trim( + Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_SHIPMENT_GUEST_ORDER_CUSTOMER_NUMBER, + $store + ) + ); + case 'creditmemo': + return trim( + Mage::getStoreConfigFlag( + self::XML_PATH_SALES_PDF_CREDITMEMO_GUEST_ORDER_CUSTOMER_NUMBER, + $store + ) + ); + } + return true; // backwards compatibility } @@ -194,6 +274,34 @@ public function getExportPattern($type) self::XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN ); } + + return true; + } + + /** + * Return export pattern for multiple documents config value + * + * @param string $type the type of this document like invoice, shipment or creditmemo + * + * @return string + */ + public function getExportPatternForMultipleDocuments($type) + { + switch ($type) { + case 'invoice': + return Mage::getStoreConfig( + self::XML_PATH_SALES_PDF_INVOICE_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + ); + case 'shipment': + return Mage::getStoreConfig( + self::XML_PATH_SALES_PDF_SHIPMENT_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + ); + case 'creditmemo': + return Mage::getStoreConfig( + self::XML_PATH_SALES_PDF_CREDITMEMO_FILENAME_EXPORT_PATTERN_FOR_MULTIPLE_DOCUMENTS + ); + } + return true; } @@ -223,6 +331,7 @@ public function getModelVars($model) '{{creditmemo_id}}' => $model->getIncrementId() ); } + $order = $model->getOrder(); $commonVars = array( '{{order_id}}' => $order->getIncrementId(), @@ -231,6 +340,7 @@ public function getModelVars($model) '{{customer_firstname}}' => $order->getCustomerFirstname(), '{{customer_lastname}}' => $order->getCustomerLastname() ); + return array_merge($specificVars, $commonVars); } else { return array( @@ -256,9 +366,16 @@ public function getExportFilename($type, $model) $type = (!$type) ? 'invoice' : $type; $pattern = $this->getExportPattern($type); if (!$pattern) { + if ($type == 'shipment') { + $pattern = 'packingslip'; + } else { + $pattern = $type; + } + $date = Mage::getSingleton('core/date'); - $pattern = $type . $date->date('Y-m-d_H-i-s'); + $pattern .= $date->date('Y-m-d_H-i-s'); } + if (substr($pattern, -4) != '.pdf') { $pattern = $pattern . '.pdf'; } @@ -269,6 +386,35 @@ public function getExportFilename($type, $model) return strtr($path, $vars); } + /** + * The filename of the exported file if multiple documents are printed at once. + * + * @param string $type the type of this document like invoice, shipment or creditmemo + * + * @return string the filename of the exported file + */ + public function getExportFilenameForMultipleDocuments($type) + { + $type = (!$type) ? 'invoice' : $type; + $pattern = $this->getExportPatternForMultipleDocuments($type); + if (!$pattern) { + if ($type == 'shipment') { + $pattern = 'packingslip'; + } else { + $pattern = $type; + } + + $date = Mage::getSingleton('core/date'); + $pattern .= $date->date('Y-m-d_H-i-s'); + } + + if (substr($pattern, -4) != '.pdf') { + $pattern = $pattern . '.pdf'; + } + + return strftime($pattern); + } + /** * Returns the path where the fonts reside. * @@ -278,4 +424,56 @@ public function getFontPath() { return Mage::getBaseDir('media') . self::FONT_PATH_IN_MEDIA; } + + public function getPageSizeConfigPath() + { + return Mage::getStoreConfig(self::XML_PATH_SALES_PDF_FIREGENTO_PDF_PAGE_SIZE); + } + + /** + * Get configured PDF color + * + * @param string $path System config path + * @return Zend_Pdf_Color_Html + */ + protected function getColor($path) + { + return new Zend_Pdf_Color_Html('#' . trim($path), '#'); + } + /** + * Get text color + * + * @return Zend_Pdf_Color_Html + */ + public function getTextColor() + { + return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_TEXT)); + } + /** + * Get table header color + * + * @return Zend_Pdf_Color_Html + */ + public function getHeaderColor() + { + return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_TABLE_HEADER)); + } + /** + * Get footer color + * + * @return Zend_Pdf_Color_Html + */ + public function getFooterColor() + { + return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_FOOTER)); + } + /** + * Get label color + * + * @return Zend_Pdf_Color_Html + */ + public function getLabelColor() + { + return $this->getColor(Mage::getStoreConfig(self::XML_PATH_COLOR_LABELS)); + } } diff --git a/src/app/code/community/FireGento/Pdf/Helper/Invoice.php b/src/app/code/community/FireGento/Pdf/Helper/Invoice.php new file mode 100644 index 0000000..426202a --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Helper/Invoice.php @@ -0,0 +1,59 @@ + + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ + +/** + * Helper for invoice creation. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ +class FireGento_Pdf_Helper_Invoice extends Mage_Core_Helper_Abstract +{ + + /** + * Gets the notes for the shipping country of the given order. + * + * @param Mage_Sales_Model_Order $order + * + * @return array the notes for the shipping country of the given order - may be empty! + */ + public function getShippingCountryNotes(Mage_Sales_Model_Order $order) + { + if (!$order->getIsVirtual()) { + $shippingCountryId = $order->getShippingAddress()->getCountryId(); + $countryNotes = unserialize(Mage::getStoreConfig('sales_pdf/invoice/shipping_country_notes')); + if ($countryNotes) { + $shippingCountryNotes = array(); + foreach ($countryNotes as $countryNote) { + if ($countryNote['country'] == $shippingCountryId) { + $shippingCountryNotes[] = $countryNote['note']; + } + } + + return $shippingCountryNotes; + } + } + + return array(); + } + +} diff --git a/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php b/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php index bd6dfc0..c742870 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php +++ b/src/app/code/community/FireGento/Pdf/Model/Creditmemo.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Creditmemo model rewrite. @@ -26,19 +24,15 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ -class FireGento_Pdf_Model_Creditmemo +class FireGento_Pdf_Model_Creditmemo extends Mage_Sales_Model_Order_Pdf_Creditmemo { /** * The actual PDF engine responsible for rendering the file. * @var Mage_Sales_Model_Order_Pdf_Abstract */ - private $_engine; + protected $_engine; /** * get pdf renderer engine @@ -51,8 +45,9 @@ protected function getEngine() $modelClass = Mage::getStoreConfig('sales_pdf/creditmemo/engine'); $engine = Mage::getModel($modelClass); - if (!$engine) { + if (!$engine || $engine instanceof FireGento_Pdf_Model_Creditmemo) { // Fallback to Magento standard creditmemo layout. + // use new here to circumvent our own rewrite $engine = new Mage_Sales_Model_Order_Pdf_Creditmemo(); } diff --git a/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php b/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php index 9f68a00..8aba0e6 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php +++ b/src/app/code/community/FireGento/Pdf/Model/Engine/Abstract.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** @@ -27,30 +25,47 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ abstract class FireGento_Pdf_Model_Engine_Abstract extends Mage_Sales_Model_Order_Pdf_Abstract { + /** + * @var array + */ public $margin = array('left' => 45, 'right' => 540); + /** + * @var array + */ public $colors = array(); + /** + * @var string + */ public $mode; + /** + * @var string + */ public $encoding; + /** + * @var string + */ public $pagecounter; - + /** + * @var mixed[] + */ protected $_imprint; - /** * @var int correct all y values if the logo is full width and bigger than normal */ protected $_marginTop = 0; - /** - * constructor to init settings + * @var int */ + private $defaultFontSize = 10; + /** + * @var array + */ + private $_headerLines = array(); + public function __construct() { parent::__construct(); @@ -60,6 +75,13 @@ public function __construct() $this->colors['black'] = new Zend_Pdf_Color_GrayScale(0); $this->colors['grey1'] = new Zend_Pdf_Color_GrayScale(0.9); + $helper = Mage::helper('firegento_pdf'); + + $this->colors['text'] = $helper->getTextColor(); + $this->colors['labels'] = $helper->getLabelColor(); + $this->colors['header'] = $helper->getHeaderColor(); + $this->colors['footer'] = $helper->getFooterColor(); + // get the default imprint $this->_imprint = Mage::getStoreConfig('general/imprint'); } @@ -80,19 +102,17 @@ public function drawLineBlocks( ) { foreach ($draw as $itemsProp) { if (!isset($itemsProp['lines']) || !is_array($itemsProp['lines'])) { - Mage::throwException(Mage::helper('sales') - ->__('Invalid draw line data. Please define "lines" array')); + Mage::throwException(Mage::helper('sales')->__('Invalid draw line data. Please define "lines" array')); } - $lines = $itemsProp['lines']; - $height = isset($itemsProp['height']) ? $itemsProp['height'] : 10; + $lines = $itemsProp['lines']; + $height = isset($itemsProp['height']) ? $itemsProp['height'] : $this->defaultFontSize; if (empty($itemsProp['shift'])) { $shift = 0; foreach ($lines as $line) { $maxHeight = 0; foreach ($line as $column) { - $lineSpacing = !empty($column['height']) - ? $column['height'] : $height; + $lineSpacing = !empty($column['height']) ? $column['height'] : $height; if (!is_array($column['text'])) { $column['text'] = array($column['text']); } @@ -106,8 +126,7 @@ public function drawLineBlocks( } if ($this->y - $itemsProp['shift'] < 50 - || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') - == 1 + || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1 && $this->y - $itemsProp['shift'] < 100) ) { $page = $this->newPage($pageSettings); @@ -119,12 +138,10 @@ public function drawLineBlocks( $fontSize = empty($column['font_size']) ? 7 : $column['font_size']; if (!empty($column['font_file'])) { - $font - = Zend_Pdf_Font::fontWithPath($column['font_file']); + $font = Zend_Pdf_Font::fontWithPath($column['font_file']); $page->setFont($font, $fontSize); } else { - $fontStyle = empty($column['font']) ? 'regular' - : $column['font']; + $fontStyle = empty($column['font']) ? 'regular' : $column['font']; switch ($fontStyle) { case 'bold': $font = $this->_setFontBold($page, $fontSize); @@ -143,33 +160,31 @@ public function drawLineBlocks( $column['text'] = array($column['text']); } - $lineSpacing = !empty($column['height']) ? $column['height'] - : $height; - $top = 0; + $lineSpacing = !empty($column['height']) ? $column['height'] : $height; + $top = 0; foreach ($column['text'] as $part) { - $feed = $column['feed']; - $textAlign = empty($column['align']) ? 'left' - : $column['align']; - $width = empty($column['width']) ? 0 : $column['width']; + $feed = $column['feed']; + $textAlign = empty($column['align']) ? 'left' : $column['align']; + $width = empty($column['width']) ? 0 : $column['width']; switch ($textAlign) { case 'right': if ($width) { - $feed = $this->getAlignRight($part, $feed, - $width, $font, $fontSize); + $feed = $this->getAlignRight($part, $feed, $width, $font, $fontSize); } else { - $feed = $feed - - $this->widthForStringUsingFontSize($part, - $font, $fontSize); + $feed -= $this->widthForStringUsingFontSize($part, $font, $fontSize); } break; case 'center': if ($width) { - $feed = $this->getAlignCenter($part, $feed, - $width, $font, $fontSize); + $feed = $this->getAlignCenter($part, $feed, $width, $font, $fontSize); } break; } + if (isset($column['color'])) { + $page->setFillColor($column['color']); + } $page->drawText($part, $feed, $this->y - $top, 'UTF-8'); + $page->setFillColor($this->colors['text']); $top += $lineSpacing; } @@ -192,6 +207,7 @@ public function drawLineBlocks( public function setMode($mode) { $this->mode = $mode; + return $this; } @@ -220,28 +236,29 @@ protected function Ln($height = 15) /** * Insert sender address bar * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * * @return void */ - protected function _insertSenderAddessBar(&$page) + protected function _insertSenderAddressBar($page) { - if (Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar') - != '' - ) { + if (Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar') != '') { $this->_setFontRegular($page, 6); + $page->setFillColor($this->colors['labels']); $page->drawText( trim(Mage::getStoreConfig('sales_pdf/firegento_pdf/sender_address_bar')), $this->margin['left'] + $this->getHeaderblockOffset(), - $this->y, $this->encoding + $this->y, + $this->encoding ); + $page->setFillColor($this->colors['text']); } } /** * Insert logo * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param mixed $store store to get data from * * @return void @@ -270,45 +287,34 @@ protected function _isLogoFullWidth($store) /** * Inserts the logo if it is positioned left, center or right. * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param mixed $store store to get data from * * @return void */ - protected function _insertLogoPositioned(&$page, $store = null) + protected function _insertLogoPositioned($page, $store = null) { - $imageRatio - = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', - $store); - $imageRatio = (empty($imageRatio)) ? 1 : $imageRatio; + $imageRatio = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', $store); + $imageRatio = (empty($imageRatio)) ? 100 : $imageRatio; - $maxwidth - = ($this->margin['right'] - $this->margin['left']) * $imageRatio - / 100; + $maxwidth = ($this->margin['right'] - $this->margin['left']) * $imageRatio / 100; $maxheight = 100; $image = Mage::getStoreConfig('sales/identity/logo', $store); - if ($image and file_exists(Mage::getBaseDir('media', $store) - . '/sales/store/logo/' . $image) - ) { - $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' - . $image; + if ($image and file_exists(Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image)) { + $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image; - list ($width, $height) = Mage::helper('firegento_pdf') - ->getScaledImageSize($image, $maxwidth, $maxheight); + list ($width, $height) = Mage::helper('firegento_pdf')->getScaledImageSize($image, $maxwidth, $maxheight); if (is_file($image)) { $image = Zend_Pdf_Image::imageWithPath($image); - $logoPosition - = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', - $store); + $logoPosition = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', $store); switch ($logoPosition) { case 'center': - $startLogoAt - = $this->margin['left'] + (($this->margin['right'] - - $this->margin['left']) / 2) - $width / 2; + $startLogoAt = + $this->margin['left'] + (($this->margin['right'] - $this->margin['left']) / 2) - $width / 2; break; case 'right': $startLogoAt = $this->margin['right'] - $width; @@ -322,8 +328,7 @@ protected function _insertLogoPositioned(&$page, $store = null) $position['x2'] = $position['x1'] + $width; $position['y2'] = $position['y1'] + $height; - $page->drawImage($image, $position['x1'], $position['y1'], - $position['x2'], $position['y2']); + $page->drawImage($image, $position['x1'], $position['y1'], $position['x2'], $position['y2']); } } } @@ -331,43 +336,34 @@ protected function _insertLogoPositioned(&$page, $store = null) /** * inserts the logo from complete left to right * - * @param Zend_Pdf_Page &$page current Zend_Pdf_Page object + * @param Zend_Pdf_Page $page current Zend_Pdf_Page object * @param mixed $store store we need the config setting from * * @todo merge _insertLogoPositioned and _insertLogoFullWidth */ - protected function _insertLogoFullWidth(&$page, $store = null) + protected function _insertLogoFullWidth($page, $store = null) { - $imageRatio - = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', - $store); + $imageRatio = (int)Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_ratio', $store); $imageRatio = (empty($imageRatio)) ? 1 : $imageRatio; - $maxwidth = 594 * $imageRatio / 100; + $maxwidth = 594 * $imageRatio / 100; $maxheight = 300; $image = Mage::getStoreConfig('sales/identity/logo', $store); - if ($image and file_exists(Mage::getBaseDir('media', $store) - . '/sales/store/logo/' . $image) - ) { - $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' - . $image; + if ($image and file_exists(Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image)) { + $image = Mage::getBaseDir('media', $store) . '/sales/store/logo/' . $image; - list ($width, $height) = Mage::helper('firegento_pdf') - ->getScaledImageSize($image, $maxwidth, $maxheight); + list ($width, $height) = Mage::helper('firegento_pdf')->getScaledImageSize($image, $maxwidth, $maxheight); if (is_file($image)) { $image = Zend_Pdf_Image::imageWithPath($image); - $logoPosition - = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', - $store); + $logoPosition = Mage::getStoreConfig('sales_pdf/firegento_pdf/logo_position', $store); switch ($logoPosition) { case 'center': - $startLogoAt = $this->margin['left'] + - (($this->margin['right'] - $this->margin['left']) - / 2) - $width / 2; + $startLogoAt = + $this->margin['left'] + (($this->margin['right'] - $this->margin['left']) / 2) - $width / 2; break; case 'right': $startLogoAt = $this->margin['right'] - $width; @@ -381,8 +377,7 @@ protected function _insertLogoFullWidth(&$page, $store = null) $position['x2'] = $position['x1'] + $width; $position['y2'] = $position['y1'] + $height; - $page->drawImage($image, $position['x1'], $position['y1'], - $position['x2'], $position['y2']); + $page->drawImage($image, $position['x1'], $position['y1'], $position['x2'], $position['y2']); $this->_marginTop = $height - 130; } } @@ -409,35 +404,40 @@ protected function insertAddressesAndHeader( // Add sender address $this->y = 705 - $this->_marginTop; - $this->_insertSenderAddessBar($page); + $this->_insertSenderAddressBar($page); // Add head - $this->y = 592 - $this->_marginTop; + // make sure that header does not overlap address bar + $headOffset = 0; + if ($this->y > 592 - $this->_marginTop) { + $headOffset = 40; + } + $this->y = 592 - $headOffset - $this->_marginTop; $this->insertHeader($page, $order, $source); /* Add table head */ // make sure that item table does not overlap heading - if ($this->y > 575 - $this->_marginTop) { - $this->y = 575 - $this->_marginTop; + if ($this->y > 575 - $headOffset - $this->_marginTop) { + $this->y = 575 - $headOffset - $this->_marginTop; } } /** * Inserts the customer address. The default address is the billing address. * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param Mage_Sales_Model_Order $order Order object * * @return void */ - protected function _insertCustomerAddress(&$page, $order) + protected function _insertCustomerAddress($page, $order) { $this->_setFontRegular($page, 9); - $billing = $this->_formatAddress($order->getBillingAddress() - ->format('pdf')); + $billing = $this->_formatAddress($order->getBillingAddress()->format('pdf')); foreach ($billing as $line) { $page->drawText(trim(strip_tags($line)), - $this->margin['left'] + $this->getHeaderblockOffset(), $this->y, + $this->margin['left'] + $this->getHeaderblockOffset(), + $this->y, $this->encoding); $this->Ln(12); } @@ -450,246 +450,291 @@ protected function _insertCustomerAddress(&$page, $order) */ protected function getHeaderblockOffset() { - if (Mage::getStoreConfig('sales_pdf/firegento_pdf/headerblocks_position') - == FireGento_Pdf_Model_System_Config_Source_Headerblocks::LEFT - ) { - $offsetAdjustment = 0; - } else { - $offsetAdjustment = 315; - } - return $offsetAdjustment; + $position = Mage::getStoreConfig('sales_pdf/firegento_pdf/headerblocks_position'); + $left = FireGento_Pdf_Model_System_Config_Source_Headerblocks::LEFT; + return $position === $left ? 0 : 315; } + /** * Insert Header * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param Mage_Sales_Model_Order $order Order object * @param object $document Document object * * @return void */ - protected function insertHeader(&$page, $order, $document) + protected function insertHeader($page, $order, $document) { - $page->setFillColor($this->colors['black']); + $this->_headerLines = array(); + $page->setFillColor($this->colors['text']); $mode = $this->getMode(); $this->_setFontBold($page, 15); - if ($mode == 'invoice') { - $title = 'Invoice'; - } elseif ($mode == 'shipment') { - $title = 'Shipment'; - } else { + $title = 'Invoice'; + if ($mode === 'creditmemo') { $title = 'Creditmemo'; + } elseif ($mode === 'shipment') { + $title = 'Packingslip'; } - $page->drawText(Mage::helper('firegento_pdf')->__($title), - $this->margin['left'], $this->y, $this->encoding); - $this->_setFontRegular($page); + $page->drawText(Mage::helper('firegento_pdf')->__($title), $this->margin['left'], $this->y, $this->encoding); $this->y += 80; - $labelRightOffset = 180 + $this->getHeaderblockOffset(); - - $valueRightOffset = 10 + $this->getHeaderblockOffset(); - $font = $this->_setFontRegular($page, 10); - $width = 80; - $numberOfLines = 0; + $width = 80; + $color = $this->colors['black']; + $fillColor = $this->colors['black']; + $fontSize = null; + $bold = false; // Invoice/shipment/creditmemo Number - if ($mode == 'invoice') { - $numberTitle = 'Invoice number:'; - } elseif ($mode == 'shipment') { - $numberTitle = 'Shipment number:'; - } else { + $numberTitle = 'Invoice number:'; + if ($mode === 'creditmemo') { $numberTitle = 'Creditmemo number:'; + } elseif ($mode === 'shipment') { + $numberTitle = 'Shipment number:'; } - $page->drawText( - Mage::helper('firegento_pdf')->__($numberTitle), - ($this->margin['right'] - $labelRightOffset), $this->y, - $this->encoding - ); - $incrementId = $document->getIncrementId(); - $page->drawText( - $incrementId, - ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize($incrementId, $font, 10)), - $this->y, $this->encoding + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__($numberTitle), + 'value' => $document->getIncrementId(), + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $this->Ln(); - $numberOfLines++; // Order Number $putOrderId = $this->_putOrderId($order); if ($putOrderId) { - $page->drawText( - Mage::helper('firegento_pdf')->__('Order number:'), - ($this->margin['right'] - $labelRightOffset), - $this->y, $this->encoding - ); - $page->drawText( - $putOrderId, ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize( - $putOrderId, $font, 10 - )), $this->y, $this->encoding + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('Order number:'), + 'value' => $putOrderId, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $this->Ln(); - $numberOfLines++; } // Customer Number if ($this->_showCustomerNumber($order->getStore())) { - $page->drawText( - Mage::helper('firegento_pdf')->__('Customer number:'), - ($this->margin['right'] - $labelRightOffset), - $this->y, $this->encoding - ); - $numberOfLines++; - - if ($order->getCustomerId() != '') { + $customerNumber = $this->_getGuestorderCustomerNo($order->getStore()); + $customerNumberFieldName = + Mage::getStoreConfig('sales_pdf/invoice/customer_number_field', $order->getStoreId()); + if ($customerNumberFieldName + === FireGento_Pdf_Model_System_Config_Source_Customer_Number::CUSTOMER_NUMBER_FIELD_INCREMENT_ID) { + try { + $customer = Mage::getModel('customer/customer')->load($order->getData('customer_id')); + $customerNumber = $customer->getData($customerNumberFieldName); + } catch (\Exception $e) { + Mage::logException($e); + //Use default + $customerNumber = $order->getCustomerId(); + } + } else { + //Use default 'entity_id' + $customerNumber = $order->getCustomerId(); + } - $prefix - = Mage::getStoreConfig('sales_pdf/invoice/customeridprefix'); + if ($order->getCustomerId() !== '') { + $prefix = Mage::getStoreConfig('sales_pdf/invoice/customeridprefix'); if (!empty($prefix)) { - $customerid = $prefix . $order->getCustomerId(); + $customerId = $prefix . $customerNumber; } else { - $customerid = $order->getCustomerId(); + $customerId = $customerNumber; } + } - $page->drawText( - $customerid, ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize( - $customerid, $font, 10 - )), $this->y, $this->encoding + if ($customerId !== '') { + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('Customer number:'), + 'value' => $customerId, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $this->Ln(); - $numberOfLines++; + } + } + + /** print VAT ID */ + if ($this->_showCustomerVATNumber($order->getStore())) { + if ($order->getBillingAddress()->getVatId()) { + $customerVatId = $order->getBillingAddress()->getVatId(); + } elseif ($order->getCustomerTaxvat()) { + $customerVatId = $order->getCustomerTaxvat(); } else { - $page->drawText( - '-', - ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize('-', $font, 10)), - $this->y, $this->encoding - ); - $this->Ln(); - $numberOfLines++; + $customerVatId = '-'; } + + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('VAT-ID:'), + 'value' => $customerVatId, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, + ); } + /** end VAT ID print*/ // Customer IP - if (!Mage::getStoreConfigFlag('sales/general/hide_customer_ip', - $order->getStoreId()) - ) { - $page->drawText( - Mage::helper('firegento_pdf')->__('Customer IP:'), - ($this->margin['right'] - $labelRightOffset), - $this->y, $this->encoding + if (!Mage::getStoreConfigFlag('sales/general/hide_customer_ip', $order->getStoreId())) { + $customerIp = $order->getData('remote_ip'); + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('Customer IP:'), + 'value' => $customerIp, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $customerIP = $order->getData('remote_ip'); - $font = $this->_setFontRegular($page, 10); - $page->drawText( - $customerIP, ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize( - $customerIP, $font, 10 - )), $this->y, $this->encoding - ); - $this->Ln(); - $numberOfLines++; } - $page->drawText( - Mage::helper('firegento_pdf')->__(($mode == 'invoice') - ? 'Invoice date:' : 'Date:'), - ($this->margin['right'] - $labelRightOffset), $this->y, - $this->encoding + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__(($mode == 'invoice') ? 'Invoice date:' + : 'Date:'), + 'value' => Mage::helper('core')->formatDate($document->getCreatedAtDate(), 'medium', false), + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $documentDate = Mage::helper('core') - ->formatDate($document->getCreatedAtDate(), 'medium', false); - $page->drawText( - $documentDate, - ($this->margin['right'] - $valueRightOffset - - $this->widthForStringUsingFontSize($documentDate, $font, 10)), - $this->y, $this->encoding - ); - $this->Ln(); - $numberOfLines++; - // Payment method. - $putPaymentMethod = ($mode == 'invoice' - && Mage::getStoreConfig('sales_pdf/invoice/payment_method_position') - == FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_HEADER); + $posHeader = FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_HEADER; + $payomentInHeader = Mage::getStoreConfig('sales_pdf/invoice/payment_method_position') === $posHeader; + $putPaymentMethod = ($mode === 'invoice' && $payomentInHeader); + if ($putPaymentMethod) { - $page->drawText( - Mage::helper('firegento_pdf')->__('Payment method:'), - ($this->margin['right'] - $labelRightOffset), - $this->y, $this->encoding - ); - $paymentMethodArray = $this->_prepareText( - $order->getPayment()->getMethodInstance()->getTitle(), $page, - $font, 10, $width - ); - $page->drawText( - array_shift($paymentMethodArray), - ($this->margin['right'] - $valueRightOffset - $width), $this->y, - $this->encoding + $font = $bold ? + $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize) + : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize); + + $paymentMethodArray = + $this->_prepareText($order->getPayment()->getMethodInstance()->getTitle(), $page, $font, + $this->defaultFontSize, $width); + + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('Payment method:'), + 'value' => array_shift($paymentMethodArray), + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); - $this->Ln(); - $numberOfLines++; - $paymentMethodArray = $this->_prepareText(implode(" ", - $paymentMethodArray), $page, $font, 10, 2 * $width); + + $paymentMethodArray = $this->_prepareText(implode(' ', $paymentMethodArray), $page, $font, + $this->defaultFontSize, 2 * $width); foreach ($paymentMethodArray as $methodString) { - $page->drawText($methodString, - $this->margin['right'] - $labelRightOffset, $this->y, - $this->encoding); - $this->Ln(); - $numberOfLines++; + $this->_headerLines[] = array( + 'content' => array( + 'label' => $methodString, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, + ); } - } // Shipping method. - $putShippingMethod = ($mode == 'invoice' - && - Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position') - == FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER - || $mode == 'shipment' - && - Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position') - == FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER); - if ($putShippingMethod) { - $page->drawText( - Mage::helper('firegento_pdf')->__('Shipping method:'), - ($this->margin['right'] - $labelRightOffset), - $this->y, $this->encoding - ); - $shippingMethodArray - = $this->_prepareText($order->getShippingDescription(), $page, - $font, 10, $width); - $page->drawText( - array_shift($shippingMethodArray), - ($this->margin['right'] - $valueRightOffset - $width), $this->y, - $this->encoding - ); - $this->Ln(); - $numberOfLines++; - $shippingMethodArray = $this->_prepareText( - implode(" ", $shippingMethodArray), $page, $font, 10, 2 * $width + $invoiceAndShippingHeader = $mode == 'invoice' + && Mage::getStoreConfig('sales_pdf/invoice/shipping_method_position') + === FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER; + $shipmentAndShippingHeader = $mode == 'shipment' + && Mage::getStoreConfig('sales_pdf/shipment/shipping_method_position') + === FireGento_Pdf_Model_System_Config_Source_Shipping::POSITION_HEADER; + if (($invoiceAndShippingHeader || $shipmentAndShippingHeader) && $order->getIsNotVirtual()) { + $font = $bold ? + $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize) + : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize); + $shippingMethodArray = $this->_prepareText($order->getShippingDescription(), $page, $font, + $this->defaultFontSize, $width); + $shippingMethod = array_shift($shippingMethodArray); + $this->_headerLines[] = array( + 'content' => array( + 'label' => Mage::helper('firegento_pdf')->__('Shipping method:'), + 'value' => $shippingMethod, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, ); + + $font = $bold ? + $this->_setFontRegular($page, $fontSize ? $fontSize : $this->defaultFontSize) + : $this->_setFontBold($page, $fontSize ? $fontSize : $this->defaultFontSize); + + $shippingMethodArray = + $this->_prepareText(implode(" ", $shippingMethodArray), $page, $font, $this->defaultFontSize, + 2 * $width); foreach ($shippingMethodArray as $methodString) { - $page->drawText($methodString, - $this->margin['right'] - $labelRightOffset, $this->y, - $this->encoding); - $this->Ln(); - $numberOfLines++; + $this->_headerLines[] = array( + 'content' => array( + 'label' => $methodString, + ), + 'fontSize' => $fontSize, + 'bold' => $bold, + ); + } + } + + $transportObject = new Varien_Object(); + $transportObject->setData(array('lines' => $this->headerLines)); + Mage::dispatchEvent( + 'firegento_pdf_header_lines', + array('headerLines' => $transportObject) + ); + Mage::dispatchEvent( + 'firegento_pdf_' . $this->getMode() . '_header_lines', + array('headerLines' => $transportObject) + ); + $this->headerLines = $transportObject->getData('lines'); + $helper = Mage::helper('firegento_pdf'); + foreach ($this->_headerLines as $line) { + $font = $this->setFont($line, $page); + foreach ($line['content'] as $key => $c) { + if ($key === 'label') { + $page->setFillColor($helper->getLabelColor()); + $offset = ($this->margin['right'] - 180 - $this->getHeaderblockOffset()); + } else { + $page->setFillColor($helper->getTextColor()); + $offset = $this->margin['right'] - 10 - $this->getHeaderblockOffset() + - $this->widthForStringUsingFontSize($c, $font, 10); + } + + $page->drawText( + $c, + $offset, + $this->y, + $this->encoding + ); } + $this->Ln(); + } + $this->y -= (count($this->_headerLines) * 2); + } + /** + * @param array $line + * @param™ Zend_Pdf_Page $page + * @return Zend_Pdf_Resource_Font + */ + protected function setFont(array $line, Zend_Pdf_Page $page) + { + if ($line['fontSize'] === null) { + $line['fontSize'] = $this->defaultFontSize; } - $this->y -= ($numberOfLines * 2); + $font = $this->_setFontRegular($page, $line['fontSize']); + if ($line['bold']) { + $font = $this->_setFontBold($page, $line['fontSize']); + } + return $font; } /** @@ -717,6 +762,32 @@ protected function _showCustomerNumber($store) ->showCustomerNumber($this->mode, $store); } + /** + * do we show the customber VAT number on this document + * + * @param mixed $store store from whom we need the config setting + * + * @return bool + */ + protected function _showCustomerVATNumber($store) + { + return Mage::helper('firegento_pdf') + ->showCustomerVATNumber($this->mode, $store); + } + + /** + * which customer number should be displayed for guest orders + * + * @param mixed $store store from whom we need the config setting + * + * @return string + */ + protected function _getGuestorderCustomerNo($store) + { + return Mage::helper('firegento_pdf') + ->getGuestorderCustomerNo($this->mode, $store); + } + /** * Generate new PDF page. * @@ -728,12 +799,15 @@ public function newPage(array $settings = array()) { $pdf = $this->_getPdf(); - $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); + $page = $pdf->newPage($this->getPageSize()); $this->pagecounter++; $pdf->pages[] = $page; $this->_addFooter($page, Mage::app()->getStore()); + // set the font because it may not be set, see https://github.com/firegento/firegento-pdf/issues/184 + $this->_setFontRegular($page, 9); + // provide the possibility to add random stuff to the page Mage::dispatchEvent( 'firegento_pdf_' . $this->getMode() . '_edit_page', @@ -772,6 +846,7 @@ protected function _drawItem( $renderer->setRenderedModel($this); $renderer->draw($position); + return $renderer->getPage(); } @@ -789,8 +864,8 @@ protected function insertTotals($page, $source) $order = $source->getOrder(); - $totalTax = 0; - $shippingTaxRate = 0; + $totalTax = 0; + $shippingTaxRate = 0; $shippingTaxAmount = $order->getShippingTaxAmount(); if ($shippingTaxAmount > 0) { @@ -815,7 +890,7 @@ protected function insertTotals($page, $source) 'row_invoiced' => $order->getShippingInvoiced(), 'tax_inc_subtotal' => false, 'tax_percent' => $shippingTaxRate, - 'tax_amount' => $shippingTaxAmount + 'tax_amount' => $shippingTaxAmount, ) ); @@ -856,14 +931,14 @@ protected function insertTotals($page, $source) $lineBlock = array( 'lines' => array(), - 'height' => 20 + 'height' => 20, ); foreach ($totals as $total) { $total->setOrder($order)->setSource($source); if ($total->canDisplay()) { - $total->setFontSize(10); + $total->setFontSize($this->defaultFontSize); // fix Magento 1.8 bug, so that taxes for shipping do not appear twice // see https://github.com/firegento/firegento-pdf/issues/106 $uniqueTotalsForDisplay = array_map( @@ -871,44 +946,46 @@ protected function insertTotals($page, $source) $total->getTotalsForDisplay())) ); foreach ($uniqueTotalsForDisplay as $totalData) { - $label = $this->fixNumberFormat($totalData['label']); + $label = $this->fixNumberFormat($totalData['label']); $lineBlock['lines'][] = array( array( 'text' => $label, - 'feed' => 470, + 'feed' => $this->margin['right'] - 70, 'align' => 'right', - 'font_size' => $totalData['font_size'] + 'font_size' => $totalData['font_size'], ), array( 'text' => $totalData['amount'], - 'feed' => 540, + 'feed' => $this->margin['right'], 'align' => 'right', - 'font_size' => $totalData['font_size'] + 'font_size' => $totalData['font_size'], ), ); } } } $page = $this->drawLineBlocks($page, array($lineBlock)); + return $page; } + /** * Insert Notes * - * @param Zend_Pdf_Page $page Current Page Object of Zend_PDF - * @param Mage_Sales_Model_Order &$order order to get note from - * @param Mage_Sales_Model_Abstract &$model invoice/shipment/creditmemo + * @param Zend_Pdf_Page $page Current Page Object of Zend_PDF + * @param Mage_Sales_Model_Order $order order to get note from + * @param Mage_Sales_Model_Abstract $model invoice/shipment/creditmemo * * @return \Zend_Pdf_Page */ - protected function _insertNote($page, &$order, &$model) + protected function _insertNote($page, $order, $model) { - $fontSize = 10; - $font = $this->_setFontRegular($page, $fontSize); - $this->y = $this->y - 60; + $fontSize = $this->defaultFontSize; + $font = $this->_setFontRegular($page, $fontSize); + $this->y -= 60; - $notes = array(); + $notes = array(); $result = new Varien_Object(); $result->setNotes($notes); Mage::dispatchEvent( @@ -916,7 +993,7 @@ protected function _insertNote($page, &$order, &$model) array( 'order' => $order, $this->getMode() => $model, - 'result' => $result + 'result' => $result, ) ); $notes = array_merge($notes, $result->getNotes()); @@ -925,38 +1002,38 @@ protected function _insertNote($page, &$order, &$model) $note = Mage::getStoreConfig('sales_pdf/' . $this->getMode() . '/note'); if (!empty($note)) { $tmpNotes = explode("\n", $note); - $notes = array_merge($notes, $tmpNotes); + $notes = array_merge($notes, $tmpNotes); } // Draw notes on PDF. foreach ($notes as $note) { // prepare the text so that it fits to the paper - foreach ($this->_prepareText($note, $page, $font, 10) as $tmpNote) { + foreach ($this->_prepareText($note, $page, $font, $this->defaultFontSize) as $tmpNote) { // create a new page if necessary if ($this->y < 50 - || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') - == 1 + || (Mage::getStoreConfig('sales_pdf/firegento_pdf/show_footer') == 1 && $this->y < 100) ) { - $page = $this->newPage(array()); + $page = $this->newPage(array()); $this->y = $this->y - 60; - $font = $this->_setFontRegular($page, $fontSize); + $font = $this->_setFontRegular($page, $fontSize); } - $page->drawText($tmpNote, $this->margin['left'], $this->y + 30, - $this->encoding); - $this->Ln(15); + $page->drawText($tmpNote, $this->margin['left'], $this->y + 30, $this->encoding); + $this->Ln(); } } + return $page; } + /** * draw footer on pdf * - * @param Zend_Pdf_Page &$page page to draw on + * @param Zend_Pdf_Page $page page to draw on * @param mixed $store store to get infos from */ - protected function _addFooter(&$page, $store = null) + protected function _addFooter($page, $store = null) { // get the imprint of the store if a store is set if (!empty($store)) { @@ -964,7 +1041,7 @@ protected function _addFooter(&$page, $store = null) $imprintObject->setImprint(Mage::getStoreConfig('general/imprint', $store)); Mage::dispatchEvent('firegento_pdf_imprint_load_after', array( - 'transport_object' => $imprintObject + 'transport_object' => $imprintObject, ) ); $this->_imprint = $imprintObject->getImprint(); @@ -986,13 +1063,14 @@ protected function _addFooter(&$page, $store = null) /** * Insert footer * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * * @return void */ - protected function _insertFooter(&$page) + protected function _insertFooter($page) { - $page->setLineColor($this->colors['black']); + $page->setLineColor($this->colors['footer']); + $page->setFillColor($this->colors['footer']); $page->setLineWidth(0.5); $page->drawLine($this->margin['left'] - 20, $this->y - 5, $this->margin['right'] + 30, $this->y - 5); @@ -1004,44 +1082,38 @@ protected function _insertFooter(&$page) 'telephone' => Mage::helper('firegento_pdf')->__('Telephone:'), 'fax' => Mage::helper('firegento_pdf')->__('Fax:'), 'email' => Mage::helper('firegento_pdf')->__('E-Mail:'), - 'web' => Mage::helper('firegento_pdf')->__('Web:') + 'web' => Mage::helper('firegento_pdf')->__('Web:'), ); $this->_insertFooterBlock($page, $fields, 70, 40, 140); $fields = array( - 'bank_name' => Mage::helper('firegento_pdf') - ->__('Bank name:'), - 'bank_account' => Mage::helper('firegento_pdf') - ->__('Account:'), - 'bank_code_number' => Mage::helper('firegento_pdf') - ->__('Bank number:'), - 'bank_account_owner' => Mage::helper('firegento_pdf') - ->__('Account owner:'), + 'bank_name' => Mage::helper('firegento_pdf')->__('Bank name:'), + 'bank_account' => Mage::helper('firegento_pdf')->__('Account:'), + 'bank_code_number' => Mage::helper('firegento_pdf')->__('Bank number:'), + 'bank_account_owner' => Mage::helper('firegento_pdf')->__('Account owner:'), 'swift' => Mage::helper('firegento_pdf')->__('SWIFT:'), - 'iban' => Mage::helper('firegento_pdf')->__('IBAN:') + 'iban' => Mage::helper('firegento_pdf')->__('IBAN:'), ); $this->_insertFooterBlock($page, $fields, 215, 50, 150); $fields = array( - 'tax_number' => Mage::helper('firegento_pdf') - ->__('Tax number:'), + 'tax_number' => Mage::helper('firegento_pdf')->__('Tax number:'), 'vat_id' => Mage::helper('firegento_pdf')->__('VAT-ID:'), - 'register_number' => Mage::helper('firegento_pdf') - ->__('Register number:'), + 'register_number' => Mage::helper('firegento_pdf')->__('Register number:'), 'ceo' => Mage::helper('firegento_pdf')->__('CEO:'), - 'city' => Mage::helper('firegento_pdf') - ->__('Registered seat:'), - 'court' => Mage::helper('firegento_pdf') - ->__('Register court:'), + 'city' => Mage::helper('firegento_pdf')->__('Registered seat:'), + 'court' => Mage::helper('firegento_pdf')->__('Register court:'), ); - $this->_insertFooterBlock($page, $fields, 355, 60, - $this->margin['right'] - 365 - 10); + $this->_insertFooterBlock($page, $fields, 365, 60, $this->margin['right'] - 375 - 10); + + $page->setLineColor($this->colors['black']); + $page->setFillColor($this->colors['text']); } /** * Insert footer block * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param array $fields Fields of footer * @param int $colposition Starting colposition * @param int $valadjust Margin between label and value @@ -1051,15 +1123,15 @@ protected function _insertFooter(&$page) * @return void */ protected function _insertFooterBlock( - &$page, + $page, $fields, $colposition = 0, $valadjust = 30, $colwidth = null ) { $fontSize = 7; - $font = $this->_setFontRegular($page, $fontSize); - $y = $this->y; + $font = $this->_setFontRegular($page, $fontSize); + $y = $this->y; $valposition = $colposition + $valadjust; @@ -1069,23 +1141,16 @@ protected function _insertFooterBlock( continue; } // draw the label - $page->drawText($label, $this->margin['left'] + $colposition, - $y, $this->encoding); + $page->drawText($label, $this->margin['left'] + $colposition, $y, $this->encoding); // prepare the value: wrap it if necessary - $val = $this->_imprint[$field]; + $val = $this->_imprint[$field]; $width = $colwidth; if (!empty($colwidth)) { // calculate the maximum width for the value - $width = $this->margin['left'] + $colposition + $colwidth - - ($this->margin['left'] + $valposition); + $width = $this->margin['left'] + $colposition + $colwidth - ($this->margin['left'] + $valposition); } - foreach ( - $this->_prepareText($val, $page, $font, $fontSize, $width) - as $tmpVal - ) { - $page->drawText($tmpVal, - $this->margin['left'] + $valposition, $y, - $this->encoding); + foreach ($this->_prepareText($val, $page, $font, $fontSize, $width) as $tmpVal) { + $page->drawText($tmpVal, $this->margin['left'] + $valposition, $y, $this->encoding); $y -= 12; } } @@ -1095,31 +1160,26 @@ protected function _insertFooterBlock( /** * Insert address of store owner * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * @param mixed $store store to get info from * * @return void */ - protected function _insertFooterAddress(&$page, $store = null) + protected function _insertFooterAddress($page, $store = null) { $fontSize = 7; - $font = $this->_setFontRegular($page, $fontSize); - $y = $this->y; - $address = ''; + $font = $this->_setFontRegular($page, $fontSize); + $y = $this->y; + $address = ''; - foreach ( - $this->_prepareText($this->_imprint['company_first'], $page, $font, - $fontSize, 90) as $companyFirst - ) { - $address .= $companyFirst . "\n"; + foreach ($this->_prepareText($this->_imprint['company_first'], $page, $font, $fontSize, 90) as $company1st) { + $address .= $company1st . "\n"; } if (array_key_exists('company_second', $this->_imprint)) { - foreach ( - $this->_prepareText($this->_imprint['company_second'], $page, - $font, $fontSize, 90) as $companySecond - ) { - $address .= $companySecond . "\n"; + foreach ($this->_prepareText($this->_imprint['company_second'], $page, $font, $fontSize, 90) as $company2nd) + { + $address .= $company2nd . "\n"; } } @@ -1134,38 +1194,37 @@ protected function _insertFooterAddress(&$page, $store = null) } if (!empty($this->_imprint['country'])) { - $countryName = Mage::getModel('directory/country') - ->loadByCode($this->_imprint['country'])->getName(); - $address .= Mage::helper('core')->__($countryName); + $countryName = Mage::getModel('directory/country')->loadByCode($this->_imprint['country'])->getName(); + $address .= Mage::helper('core')->__($countryName); } foreach (explode("\n", $address) as $value) { if ($value !== '') { - $page->drawText(trim(strip_tags($value)), - $this->margin['left'] - 20, $y, $this->encoding); + $page->drawText(trim(strip_tags($value)), $this->margin['left'] - 20, $y, $this->encoding); $y -= 12; } } } + /** * Insert page counter * - * @param Zend_Pdf_Page &$page Current page object of Zend_Pdf + * @param Zend_Pdf_Page $page Current page object of Zend_Pdf * * @return void */ - protected function _insertPageCounter(&$page) + protected function _insertPageCounter($page) { $font = $this->_setFontRegular($page, 9); + $page->setFillColor($this->colors['labels']); $page->drawText( - Mage::helper('firegento_pdf')->__('Page') . ' ' - . $this->pagecounter, - $this->margin['right'] - 23 - - $this->widthForStringUsingFontSize($this->pagecounter, $font, 9), + Mage::helper('firegento_pdf')->__('Page') . ' ' . $this->pagecounter, + $this->margin['right'] - 23 - $this->widthForStringUsingFontSize($this->pagecounter, $font, 9), $this->y, $this->encoding ); + $page->setFillColor($this->colors['text']); } /** @@ -1178,6 +1237,7 @@ public function getFontRegular() if ($this->getRegularFont() && $this->regularFontFileExists()) { return Zend_Pdf_Font::fontWithPath($this->getRegularFontFile()); } + return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA); } @@ -1193,6 +1253,7 @@ protected function _setFontRegular($object, $size = 10) { $font = $this->getFontRegular(); $object->setFont($font, $size); + return $font; } @@ -1206,6 +1267,7 @@ public function getFontBold() if ($this->getBoldFont() && $this->boldFontFileExists()) { return Zend_Pdf_Font::fontWithPath($this->getBoldFontFile()); } + return Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA_BOLD); } @@ -1221,6 +1283,7 @@ protected function _setFontBold($object, $size = 10) { $font = $this->getFontBold(); $object->setFont($font, $size); + return $font; } @@ -1234,6 +1297,7 @@ public function getFontItalic() if ($this->getItalicFont() && $this->italicFontFileExists()) { return Zend_Pdf_Font::fontWithPath($this->getItalicFontFile()); } + return Zend_Pdf_Font::fontWithName( Zend_Pdf_Font::FONT_HELVETICA_ITALIC ); @@ -1251,6 +1315,7 @@ protected function _setFontItalic($object, $size = 10) { $font = $this->getFontItalic(); $object->setFont($font, $size); + return $font; } @@ -1270,7 +1335,7 @@ public function _prepareText($text, $page, $font, $fontSize, $width = null) if (empty($text)) { return array(); } - $lines = ''; + $lines = ''; $currentLine = ''; // calculate the page's width with respect to the margins if (empty($width)) { @@ -1278,8 +1343,10 @@ public function _prepareText($text, $page, $font, $fontSize, $width = null) = $page->getWidth() - $this->margin['left'] - ($page->getWidth() - $this->margin['right']); } - $textChunks = explode(' ', $text); + // regular expression that splits on whitespaces and dashes based on http://stackoverflow.com/a/11758732/719023 + $textChunks = preg_split('/([^\s-]+[\s-]+)/', $text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE); foreach ($textChunks as $textChunk) { + $textChunk = trim($textChunk); if ($this->widthForStringUsingFontSize($currentLine . ' ' . $textChunk, $font, $fontSize) < $width ) { @@ -1290,12 +1357,13 @@ public function _prepareText($text, $page, $font, $fontSize, $width = null) $currentLine .= $textChunk; } else { // text is too broad, so add new line character - $lines .= $currentLine . "\n"; + $lines .= $currentLine . "\n"; $currentLine = $textChunk; } } // append the last line $lines .= $currentLine; + return explode("\n", $lines); } @@ -1307,7 +1375,7 @@ public function _prepareText($text, $page, $font, $fontSize, $width = null) * * @return string */ - private function fixNumberFormat($label) + protected function fixNumberFormat($label) { $pattern = "/(.*)\((\d{1,2}\.\d{4}%)\)/"; if (preg_match($pattern, $label, $matches)) { @@ -1318,8 +1386,10 @@ private function fixNumberFormat($label) 'precision' => 2, ) ); + return $matches[1] . '(' . $percentage . '%)'; } + return $label; } @@ -1328,10 +1398,10 @@ private function fixNumberFormat($label) * * @return string */ - private function getBoldFontFile() + protected function getBoldFontFile() { return Mage::helper('firegento_pdf')->getFontPath() . DS - . $this->getBoldFont(); + . $this->getBoldFont(); } /** @@ -1339,7 +1409,7 @@ private function getBoldFontFile() * * @return string */ - private function getBoldFont() + protected function getBoldFont() { return Mage::getStoreConfig( FireGento_Pdf_Helper_Data::XML_PATH_BOLD_FONT @@ -1351,7 +1421,7 @@ private function getBoldFont() * * @return bool */ - private function boldFontFileExists() + protected function boldFontFileExists() { return file_exists($this->getBoldFontFile()); } @@ -1361,7 +1431,7 @@ private function boldFontFileExists() * * @return string */ - private function getItalicFont() + protected function getItalicFont() { return Mage::getStoreConfig( FireGento_Pdf_Helper_Data::XML_PATH_ITALIC_FONT @@ -1373,7 +1443,7 @@ private function getItalicFont() * * @return bool */ - private function ItalicFontFileExists() + protected function ItalicFontFileExists() { return file_exists($this->getItalicFontFile()); } @@ -1383,19 +1453,17 @@ private function ItalicFontFileExists() * * @return string */ - private function getItalicFontFile() + protected function getItalicFontFile() { - return Mage::helper('firegento_pdf')->getFontPath() . DS - . $this->getItalicFont(); + return Mage::helper('firegento_pdf')->getFontPath() . DS . $this->getItalicFont(); } - /** * get the regular font path * * @return string */ - private function getRegularFont() + protected function getRegularFont() { return Mage::getStoreConfig( FireGento_Pdf_Helper_Data::XML_PATH_REGULAR_FONT @@ -1407,7 +1475,7 @@ private function getRegularFont() * * @return bool */ - private function regularFontFileExists() + protected function regularFontFileExists() { return file_exists($this->getRegularFontFile()); } @@ -1417,9 +1485,17 @@ private function regularFontFileExists() * * @return string */ - private function getRegularFontFile() + protected function getRegularFontFile() { return Mage::helper('firegento_pdf')->getFontPath() . DS - . $this->getRegularFont(); + . $this->getRegularFont(); + } + + /** + * @return string + */ + private function getPageSize() + { + return Mage::helper('firegento_pdf')->getPageSizeConfigPath(); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php b/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php index f8e331c..f39a099 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php +++ b/src/app/code/community/FireGento/Pdf/Model/Engine/Creditmemo/Default.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Creditmemo model rewrite. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Engine_Creditmemo_Default extends FireGento_Pdf_Model_Engine_Abstract { @@ -52,6 +46,7 @@ public function __construct() */ public function getPdf($creditmemos = array()) { + $currentStore = Mage::app()->getStore()->getCode(); $this->_beforeGetPdf(); $this->_initRenderer('creditmemo'); @@ -65,6 +60,7 @@ public function getPdf($creditmemos = array()) Mage::app()->getLocale()->emulate($creditmemo->getStoreId()); Mage::app()->setCurrentStore($creditmemo->getStoreId()); } + $order = $creditmemo->getOrder(); $this->setOrder($order); @@ -83,6 +79,7 @@ public function getPdf($creditmemos = array()) if ($item->getOrderItem()->getParentItem()) { continue; } + /* Draw item */ $position++; $this->_drawItem($item, $page, $order, $position); @@ -100,13 +97,17 @@ public function getPdf($creditmemos = array()) // Add footer $this->_addFooter($page, $creditmemo->getStore()); + + if ($creditmemo->getStoreId()) { + Mage::app()->getLocale()->revert(); + } } + // Revert back to the original current store + Mage::app()->setCurrentStore($currentStore); + $this->_afterGetPdf(); - if ($creditmemo->getStoreId()) { - Mage::app()->getLocale()->revert(); - } return $pdf; } @@ -119,8 +120,8 @@ public function getPdf($creditmemos = array()) */ protected function _drawHeader(Zend_Pdf_Page $page) { - $page->setFillColor($this->colors['grey1']); - $page->setLineColor($this->colors['grey1']); + $page->setFillColor($this->colors['header']); + $page->setLineColor($this->colors['header']); $page->setLineWidth(1); $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15); @@ -128,55 +129,62 @@ protected function _drawHeader(Zend_Pdf_Page $page) $font = $this->_setFontRegular($page, 9); $this->y -= 11; + $page->drawText(Mage::helper('firegento_pdf')->__('Pos'), $this->margin['left'] + 3, $this->y, $this->encoding); $page->drawText( - Mage::helper('firegento_pdf')->__('Pos'), - $this->margin['left'] + 3, - $this->y, - $this->encoding - ); - $page->drawText( - Mage::helper('firegento_pdf')->__('No.'), - $this->margin['left'] + 25, - $this->y, - $this->encoding + Mage::helper('firegento_pdf')->__('No.'), $this->margin['left'] + 25, $this->y, $this->encoding ); $page->drawText( - Mage::helper('firegento_pdf')->__('Description'), - $this->margin['left'] + 120, - $this->y, - $this->encoding + Mage::helper('firegento_pdf')->__('Description'), $this->margin['left'] + 130, $this->y, $this->encoding ); - $singlePrice = Mage::helper('firegento_pdf')->__('Price (excl. tax)'); - $page->drawText( - $singlePrice, - $this->margin['right'] - 153 - $this->widthForStringUsingFontSize($singlePrice, $font, 9), - $this->y, - $this->encoding + $columns = array(); + $columns['price'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Price'), + '_width' => 60 ); - - $page->drawText( - Mage::helper('firegento_pdf')->__('Qty'), - $this->margin['left'] + 360, - $this->y, - $this->encoding + $columns['price_incl_tax'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Price (incl. tax)'), + '_width' => 60 ); - - $taxLabel = Mage::helper('firegento_pdf')->__('Tax'); - $page->drawText( - $taxLabel, - $this->margin['right'] - 65 - $this->widthForStringUsingFontSize($taxLabel, $font, 9), - $this->y, - $this->encoding + $columns['qty'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Qty'), + '_width' => 40 ); - - $totalLabel = Mage::helper('firegento_pdf')->__('Total'); - $page->drawText( - $totalLabel, - $this->margin['right'] - 10 - $this->widthForStringUsingFontSize($totalLabel, $font, 10), - $this->y, - $this->encoding + $columns['tax'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Tax'), + '_width' => 50 + ); + $columns['tax_rate'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Tax rate'), + '_width' => 50 ); + $columns['subtotal'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Total'), + '_width' => 50 + ); + $columns['subtotal_incl_tax'] = array( + 'label' => Mage::helper('firegento_pdf')->__('Total (incl. tax)'), + '_width' => 70 + ); + // draw price, tax, and subtotal in specified order + $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order')); + // draw starting from right + $columnsOrder = array_reverse($columnsOrder); + $columnOffset = 0; + foreach ($columnsOrder as $columnName) { + $columnName = trim($columnName); + if (array_key_exists($columnName, $columns)) { + $column = $columns[$columnName]; + $labelWidth = $this->widthForStringUsingFontSize($column['label'], $font, 9); + $page->drawText( + $column['label'], + $this->margin['right'] - $columnOffset - $labelWidth, + $this->y, + $this->encoding + ); + $columnOffset += $column['_width']; + } + } } /** @@ -206,6 +214,10 @@ protected function _initRenderer($type) 'model' => 'firegento_pdf/items_downloadable', 'renderer' => null ); + $this->_renderers['ugiftcert'] = array( + 'model' => 'firegento_pdf/items_unirgy_default', + 'renderer' => null + ); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php b/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php index a953fa5..490b157 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php +++ b/src/app/code/community/FireGento/Pdf/Model/Engine/Invoice/Default.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Default invoice rendering engine. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Engine_Invoice_Default extends FireGento_Pdf_Model_Engine_Abstract { @@ -52,6 +46,7 @@ public function __construct() */ public function getPdf($invoices = array()) { + $currentStore = Mage::app()->getStore()->getCode(); $this->_beforeGetPdf(); $this->_initRenderer('invoice'); @@ -65,6 +60,7 @@ public function getPdf($invoices = array()) Mage::app()->getLocale()->emulate($invoice->getStoreId()); Mage::app()->setCurrentStore($invoice->getStoreId()); } + $order = $invoice->getOrder(); $this->setOrder($order); @@ -104,8 +100,15 @@ public function getPdf($invoices = array()) // Add footer $this->_addFooter($page, $invoice->getStore()); + + if ($invoice->getStoreId()) { + Mage::app()->getLocale()->revert(); + } } + // Revert back to the original current store + Mage::app()->setCurrentStore($currentStore); + $this->_afterGetPdf(); return $pdf; @@ -114,14 +117,14 @@ public function getPdf($invoices = array()) /** * Insert Table Header for Items * - * @param Zend_Pdf_Page &$page current page object of Zend_PDF + * @param Zend_Pdf_Page $page current page object of Zend_PDF * * @return void */ - protected function insertTableHeader(&$page) + protected function insertTableHeader($page) { - $page->setFillColor($this->colors['grey1']); - $page->setLineColor($this->colors['grey1']); + $page->setFillColor($this->colors['header']); + $page->setLineColor($this->colors['header']); $page->setLineWidth(1); $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'], $this->y - 15); @@ -214,6 +217,10 @@ protected function _initRenderer($type) 'model' => 'firegento_pdf/items_downloadable', 'renderer' => null ); + $this->_renderers['ugiftcert'] = array( + 'model' => 'firegento_pdf/items_unirgy_default', + 'renderer' => null + ); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php b/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php index fa030c8..3c317c1 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php +++ b/src/app/code/community/FireGento/Pdf/Model/Engine/Shipment/Default.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ - /** * Shipment model rewrite. * * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Engine_Shipment_Default extends FireGento_Pdf_Model_Engine_Abstract @@ -54,6 +47,7 @@ public function __construct() */ public function getPdf($shipments = array()) { + $currentStore = Mage::app()->getStore()->getCode(); $this->_beforeGetPdf(); $this->_initRenderer('shipment'); @@ -67,6 +61,7 @@ public function getPdf($shipments = array()) Mage::app()->getLocale()->emulate($shipment->getStoreId()); Mage::app()->setCurrentStore($shipment->getStoreId()); } + $order = $shipment->getOrder(); $this->setOrder($order); @@ -98,13 +93,23 @@ public function getPdf($shipments = array()) $page = $this->_drawItem($item, $page, $order, $position); } + /* add shipment tracks */ + $page = $this->_printShipmentTracks($page, $order, $shipment); + /* add note */ $page = $this->_insertNote($page, $order, $shipment); // Add footer $this->_addFooter($page, $shipment->getStore()); + + if ($shipment->getStoreId()) { + Mage::app()->getLocale()->revert(); + } } + // Revert back to the original current store + Mage::app()->setCurrentStore($currentStore); + $this->_afterGetPdf(); return $pdf; @@ -113,19 +118,17 @@ public function getPdf($shipments = array()) /** * Inserts the customer's shipping address. * - * @param Zend_Pdf_Page &$page current page object of Zend_Pdf + * @param Zend_Pdf_Page $page current page object of Zend_Pdf * @param Mage_Sales_Model_Order $order order object * * @return void */ - protected function _insertCustomerAddress(&$page, $order) + protected function _insertCustomerAddress($page, $order) { $this->_setFontRegular($page, 9); - $shipping = $this->_formatAddress($order->getShippingAddress() - ->format('pdf')); + $shipping = $this->_formatAddress($order->getShippingAddress()->format('pdf')); foreach ($shipping as $line) { - $page->drawText(trim(strip_tags($line)), $this->margin['left'], - $this->y, $this->encoding); + $page->drawText(trim(strip_tags($line)), $this->margin['left'], $this->y, $this->encoding); $this->Ln(12); } } @@ -137,11 +140,10 @@ protected function _insertCustomerAddress(&$page, $order) */ protected function insertTableHeader($page) { - $page->setFillColor($this->colors['grey1']); - $page->setLineColor($this->colors['grey1']); + $page->setFillColor($this->colors['header']); + $page->setLineColor($this->colors['header']); $page->setLineWidth(1); - $page->drawRectangle($this->margin['left'], $this->y, - $this->margin['right'] - 10, $this->y - 15); + $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'] - 10, $this->y - 15); $page->setFillColor($this->colors['black']); $this->_setFontRegular($page, 9); @@ -178,16 +180,62 @@ protected function insertShippingAddress($page, $order) { $this->_setFontRegular($page, 9); - $billing = $this->_formatAddress($order->getShippingAddress() - ->format('pdf')); + $billing = $this->_formatAddress($order->getShippingAddress()->format('pdf')); foreach ($billing as $line) { - $page->drawText(trim(strip_tags($line)), $this->margin['left'], - $this->y, $this->encoding); + $page->drawText(trim(strip_tags($line)), $this->margin['left'], $this->y, $this->encoding); $this->Ln(12); } } + /** + * This will print all the shipment tracks. + * + * @param Zend_Pdf_Page $page + * @param Mage_Sales_Model_Order $order + * @param Mage_Sales_Model_Order_Shipment $shipment + * + * @return Zend_Pdf_Page + */ + protected function _printShipmentTracks($page, $order, $shipment) + { + if (!Mage::getStoreConfigFlag('sales_pdf/shipment/show_tracking_numbers') || $order->getIsVirtual()) { + return $page; + } + + $tracks = array(); + if ($shipment) { + $tracks = $shipment->getAllTracks(); + } + + if (empty($tracks)) { + return $page; + } + + $this->y -= 20; + $page->setFillColor($this->colors['header']); + $page->setLineColor($this->colors['header']); + $page->setLineWidth(1); + $page->drawRectangle($this->margin['left'], $this->y, $this->margin['right'] - 10, $this->y - 15); + $page->setFillColor($this->colors['black']); + $this->_setFontRegular($page, 9); + $this->y -= 11; + $page->drawText(Mage::helper('sales')->__('Carrier'), $this->margin['left'], $this->y, 'UTF-8'); + $page->drawText(Mage::helper('sales')->__('Number'), 290, $this->y, 'UTF-8'); + $page->setFillColor($this->colors['text']); + $this->y -= 18; + foreach ($tracks as $track) { + $maxTitleLen = 45; + $endOfTitle = strlen($track->getTitle()) > $maxTitleLen ? '...' : ''; + $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle; + $page->drawText($truncatedTitle, $this->margin['left'], $this->y, 'UTF-8'); + $page->drawText($track->getNumber(), 290, $this->y, 'UTF-8'); + $this->y -= 18; + } + + return $page; + } + /** * Initialize renderer process. * @@ -207,6 +255,10 @@ protected function _initRenderer($type) 'model' => 'firegento_pdf/items_shipment_bundle', 'renderer' => null ); + $this->_renderers['ugiftcert'] = array( + 'model' => 'firegento_pdf/items_unirgy_shipment_default', + 'renderer' => null + ); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Invoice.php b/src/app/code/community/FireGento/Pdf/Model/Invoice.php index 7aff126..514c951 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Invoice.php +++ b/src/app/code/community/FireGento/Pdf/Model/Invoice.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Invoice model rewrite. @@ -29,12 +27,8 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ -class FireGento_Pdf_Model_Invoice +class FireGento_Pdf_Model_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice { /** @@ -42,7 +36,7 @@ class FireGento_Pdf_Model_Invoice * * @var Mage_Sales_Model_Order_Pdf_Abstract */ - private $_engine; + protected $_engine; /** * get pdf rendering engine @@ -55,8 +49,9 @@ protected function getEngine() $modelClass = Mage::getStoreConfig('sales_pdf/invoice/engine'); $engine = Mage::getModel($modelClass); - if (!$engine) { + if (!$engine || $engine instanceof FireGento_Pdf_Model_Invoice) { // Fallback to Magento standard invoice layout. + // use new here to circumvent our own rewrite $engine = new Mage_Sales_Model_Order_Pdf_Invoice(); } diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php b/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php index eb2a25e..3a58f89 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Bundle.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Bundle item model rewrite. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Items_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice { @@ -49,7 +43,6 @@ public function draw($position = 1) $fontSize = 9; - $this->_setFontRegular(); $items = $this->getChilds($item); $_prevOptionId = ''; @@ -120,6 +113,7 @@ public function draw($position = 1) } else { $name = $_item->getName(); } + $line[] = array( 'text' => Mage::helper('core/string')->str_split($name, 35, true, true), 'feed' => $pdf->margin['left'] + 130, @@ -131,7 +125,7 @@ public function draw($position = 1) $columns = array(); // prepare qty $columns['qty'] = array( - 'text' => $item->getQty() * 1, + 'text' => $_item->getQty() * 1, 'align' => 'right', 'font_size' => $fontSize, '_width' => 30 @@ -139,7 +133,7 @@ public function draw($position = 1) // prepare price $columns['price'] = array( - 'text' => $order->formatPriceTxt($item->getPrice()), + 'text' => $order->formatPriceTxt($_item->getPrice()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 60 @@ -147,7 +141,7 @@ public function draw($position = 1) // prepare price_incl_tax $columns['price_incl_tax'] = array( - 'text' => $order->formatPriceTxt($item->getPriceInclTax()), + 'text' => $order->formatPriceTxt($_item->getPriceInclTax()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 60 @@ -155,7 +149,7 @@ public function draw($position = 1) // prepare tax $columns['tax'] = array( - 'text' => $order->formatPriceTxt($item->getTaxAmount() + $item->getHiddenTaxAmount()), + 'text' => $order->formatPriceTxt($_item->getTaxAmount() + $_item->getHiddenTaxAmount()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 50 @@ -163,7 +157,7 @@ public function draw($position = 1) // prepare tax_rate $columns['tax_rate'] = array( - 'text' => round($item->getOrderItem()->getTaxPercent(), 2) . '%', + 'text' => round($_item->getOrderItem()->getTaxPercent(), 2) . '%', 'align' => 'right', 'font_size' => $fontSize, '_width' => 50 @@ -171,7 +165,7 @@ public function draw($position = 1) // prepare subtotal $columns['subtotal'] = array( - 'text' => $order->formatPriceTxt($item->getRowTotal()), + 'text' => $order->formatPriceTxt($_item->getRowTotal()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 50 @@ -179,7 +173,7 @@ public function draw($position = 1) // prepare subtotal_incl_tax $columns['subtotal_incl_tax'] = array( - 'text' => $order->formatPriceTxt($item->getRowTotalInclTax()), + 'text' => $order->formatPriceTxt($_item->getRowTotalInclTax()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 70 @@ -217,7 +211,7 @@ public function draw($position = 1) 'feed' => 35 ); - if ($option['value']) { + if (isset($option['value'])) { $text = array(); $_printValue = isset($option['print_value']) ? $option['print_value'] diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Default.php b/src/app/code/community/FireGento/Pdf/Model/Items/Default.php index aa6ba26..1d7ebc0 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Default.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Default.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Default item model rewrite. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Items_Default extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Default { @@ -46,6 +40,7 @@ public function draw($position = 1) $item = $this->getItem(); $pdf = $this->getPdf(); $page = $this->getPage(); + $helper = Mage::helper('firegento_pdf'); $lines = array(); $fontSize = 9; @@ -79,13 +74,15 @@ public function draw($position = 1) foreach ($options as $option) { $optionTxt = $option['label'] . ': '; // append option value - if ($option['value']) { + if (isset($option['value'])) { $optionTxt .= isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']); } + $optionArray = $pdf->_prepareText($optionTxt, $page, $pdf->getFontRegular(), $fontSize, 215); $lines[][] = array( - 'text' => $optionArray, - 'feed' => $pdf->margin['left'] + 135 + 'text' => $optionArray, + 'feed' => $pdf->margin['left'] + 135, + 'color' => $helper->getLabelColor(), ); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php b/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php index ebb73f2..8ed6d89 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Downloadable.php @@ -15,10 +15,9 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ - /** * Class FireGento_Pdf_Model_Items_Downloadable * @@ -42,6 +41,7 @@ public function draw($position = 1) $item = $this->getItem(); $pdf = $this->getPdf(); $page = $this->getPage(); + $helper = Mage::helper('firegento_pdf'); $lines = array(); $fontSize = 9; @@ -77,15 +77,15 @@ public function draw($position = 1) foreach ($options as $option) { $optionTxt = $option['label'] . ': '; // append option value - if ($option['value']) { - $optionTxt .= isset($option['print_value']) - ? $option['print_value'] : strip_tags($option['value']); + if (isset($option['value'])) { + $optionTxt .= isset($option['print_value'])? $option['print_value'] : strip_tags($option['value']); } - $optionArray = $pdf->_prepareText($optionTxt, $page, - $pdf->getFontRegular(), $fontSize, 215); + + $optionArray = $pdf->_prepareText($optionTxt, $page, $pdf->getFontRegular(), $fontSize, 215); $lines[][] = array( - 'text' => $optionArray, - 'feed' => $pdf->margin['left'] + 135 + 'text' => $optionArray, + 'feed' => $pdf->margin['left'] + 135, + 'color' => $helper->getLabelColor(), ); } } @@ -146,8 +146,7 @@ public function draw($position = 1) // prepare tax_rate $columns['tax_rate'] = array( - 'text' => round($item->getOrderItem()->getTaxPercent(), 2) - . '%', + 'text' => round($item->getOrderItem()->getTaxPercent(), 2) . '%', 'align' => 'right', 'font_size' => $fontSize, '_width' => 50 @@ -155,8 +154,7 @@ public function draw($position = 1) // prepare subtotal $columns['subtotal'] = array( - 'text' => $order->formatPriceTxt($item->getPrice() - * $item->getQty() * 1), + 'text' => $order->formatPriceTxt($item->getPrice() * $item->getQty() * 1), 'align' => 'right', 'font_size' => $fontSize, '_width' => 50 @@ -164,16 +162,14 @@ public function draw($position = 1) // prepare subtotal_incl_tax $columns['subtotal_incl_tax'] = array( - 'text' => $order->formatPriceTxt(($item->getPrice() - * $item->getQty() * 1) + $item->getTaxAmount()), + 'text' => $order->formatPriceTxt(($item->getPrice() * $item->getQty() * 1) + $item->getTaxAmount()), 'align' => 'right', 'font_size' => $fontSize, '_width' => 70 ); // draw columns in specified order - $columnsOrder = explode(',', - Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order')); + $columnsOrder = explode(',', Mage::getStoreConfig('sales_pdf/invoice/item_price_column_order')); // draw starting from right $columnsOrder = array_reverse($columnsOrder); $columnOffset = 0; @@ -208,8 +204,7 @@ public function draw($position = 1) 'height' => 15 ); - $page = $pdf->drawLineBlocks($page, array($lineBlock), - array('table_header' => true)); + $page = $pdf->drawLineBlocks($page, array($lineBlock), array('table_header' => true)); $this->setPage($page); } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php b/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php index edf8dcb..f637faf 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Grouped.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ /** @@ -24,8 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ class FireGento_Pdf_Model_Items_Grouped extends Mage_Sales_Model_Order_Pdf_Items_Invoice_Grouped { diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php b/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php index 8a33561..f401ed9 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Bundle.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ /** @@ -24,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Items_Shipment_Bundle extends Mage_Bundle_Model_Sales_Order_Pdf_Items_Shipment { @@ -42,8 +38,6 @@ public function draw() $pdf = $this->getPdf(); $page = $this->getPage(); - $this->_setFontRegular(); - $shipItems = $this->getChilds($item); $items = array_merge(array($item->getOrderItem()), $item->getOrderItem()->getChildrenItems()); @@ -92,6 +86,7 @@ public function draw() foreach (Mage::helper('core/string')->str_split($_item->getSku(), 20) as $part) { $text[] = $part; } + $line[] = array( 'text' => $text, 'feed' => 45, @@ -105,10 +100,12 @@ public function draw() } else { $name = $_item->getName(); } + $text = array(); foreach (Mage::helper('core/string')->str_split($name, 60, true, true) as $part) { $text[] = $part; } + $line[] = array( 'text' => $text, 'feed' => 150, @@ -152,7 +149,7 @@ public function draw() 'feed' => 60 ); - if ($option['value']) { + if (isset($option['value'])) { $text = array(); $_printValue = isset($option['print_value']) ? $option['print_value'] diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php b/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php index e8edfbd..ea8612b 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Shipment/Default.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Shipment default item model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Items_Shipment_Default extends Mage_Sales_Model_Order_Pdf_Items_Shipment_Default { @@ -84,7 +78,7 @@ public function draw() ); // draw options value - if ($option['value']) { + if (isset($option['value'])) { $_printVal = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']); $values = explode(', ', $_printVal); foreach ($values as $value) { diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php b/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php new file mode 100644 index 0000000..ceb1afd --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Default.php @@ -0,0 +1,38 @@ + + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Default item model rewrite. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ +class FireGento_Pdf_Model_Items_Unirgy_Default extends FireGento_Pdf_Model_Items_Default +{ + + public function getItemOptions() + { + $result = parent::getItemOptions(); + Mage::helper('ugiftcert')->addOrderItemCertOptions($result, $this->getItem()); + return $result; + } + +} diff --git a/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php b/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php new file mode 100644 index 0000000..ff21c2c --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Model/Items/Unirgy/Shipment/Default.php @@ -0,0 +1,38 @@ + + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Default item model rewrite. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ +class FireGento_Pdf_Model_Items_Unirgy_Shipment_Default extends FireGento_Pdf_Model_Items_Shipment_Default +{ + + public function getItemOptions() + { + $result = parent::getItemOptions(); + Mage::helper('ugiftcert')->addOrderItemCertOptions($result, $this->getItem()); + return $result; + } + +} diff --git a/src/app/code/community/FireGento/Pdf/Model/Observer.php b/src/app/code/community/FireGento/Pdf/Model/Observer.php index 9494668..36102ab 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Observer.php +++ b/src/app/code/community/FireGento/Pdf/Model/Observer.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * FireGento Pdf observer. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Observer { @@ -42,11 +36,34 @@ class FireGento_Pdf_Model_Observer */ public function addInvoiceNotes(Varien_Event_Observer $observer) { - $this->addInvoiceDateNotice($observer); - $this->addInvoiceMaturity($observer); - $this->addPaymentMethod($observer); - $this->addShippingMethod($observer); - $this->addInvoiceComments($observer); + $this->_addShippingCountryNotes($observer); + $this->_addInvoiceDateNotice($observer); + $this->_addInvoiceMaturity($observer); + $this->_addPaymentMethod($observer, 'invoice'); + $this->_addShippingMethod($observer); + $this->_addInvoiceComments($observer); + + return $this; + } + + /** + * Add notes based on shipping country + * + * @param Varien_Event_Observer $observer observer object + * + * @return $this + */ + protected function _addShippingCountryNotes(Varien_Event_Observer $observer) + { + $order = $observer->getOrder(); + $shippingCountryNotes = Mage::helper('firegento_pdf/invoice')->getShippingCountryNotes($order); + + if (!empty($shippingCountryNotes)) { + $result = $observer->getResult(); + $notes = $result->getNotes(); + $notes = array_merge($notes, $shippingCountryNotes); + $result->setNotes($notes); + } return $this; } @@ -58,7 +75,7 @@ public function addInvoiceNotes(Varien_Event_Observer $observer) * * @return $this */ - public function addInvoiceDateNotice(Varien_Event_Observer $observer) + protected function _addInvoiceDateNotice(Varien_Event_Observer $observer) { if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_date_notice')) { return $this; @@ -78,7 +95,7 @@ public function addInvoiceDateNotice(Varien_Event_Observer $observer) * * @return FireGento_Pdf_Model_Observer */ - public function addInvoiceMaturity(Varien_Event_Observer $observer) + protected function _addInvoiceMaturity(Varien_Event_Observer $observer) { $result = $observer->getResult(); $notes = $result->getNotes(); @@ -98,15 +115,15 @@ public function addInvoiceMaturity(Varien_Event_Observer $observer) } /** - * Add payment method to invoice notes. + * Add payment method to invoice / creditmemo notes. * * @param Varien_Event_Observer $observer observer object * * @return FireGento_Pdf_Model_Observer */ - public function addPaymentMethod(Varien_Event_Observer $observer) + protected function _addPaymentMethod(Varien_Event_Observer $observer, $mode) { - if (Mage::getStoreConfig('sales_pdf/invoice/payment_method_position') + if (Mage::getStoreConfig('sales_pdf/' . $mode . '/payment_method_position') != FireGento_Pdf_Model_System_Config_Source_Payment::POSITION_NOTE ) { return $this; @@ -128,7 +145,7 @@ public function addPaymentMethod(Varien_Event_Observer $observer) * * @return FireGento_Pdf_Model_Observer */ - public function addShippingMethod(Varien_Event_Observer $observer) + protected function _addShippingMethod(Varien_Event_Observer $observer) { $invoice = $observer->getInvoice(); $shipment = $observer->getShipment(); @@ -150,7 +167,6 @@ public function addShippingMethod(Varien_Event_Observer $observer) return $this; } - /** * Add the invoice comments * @@ -158,7 +174,7 @@ public function addShippingMethod(Varien_Event_Observer $observer) * * @return FireGento_Pdf_Model_Observer */ - public function addInvoiceComments(Varien_Event_Observer $observer) + protected function _addInvoiceComments(Varien_Event_Observer $observer) { if (!Mage::getStoreConfigFlag('sales_pdf/invoice/show_comments')) { return $this; @@ -184,31 +200,154 @@ public function addInvoiceComments(Varien_Event_Observer $observer) } /** - * Adds a barcode representing the order number to the shipment if activated. + * Add notes to shipment document. * - * @param Varien_Event_Observer $observer observer which is passed by magento + * @param Varien_Event_Observer $observer observer object * * @return FireGento_Pdf_Model_Observer */ - public function addBarcode(Varien_Event_Observer $observer) + public function addShipmentNotes(Varien_Event_Observer $observer) + { + $this->_addShippingMethod($observer); + $this->_addShipmentComments($observer); + + return $this; + } + + /** + * Add the shipment comments + * + * @param Varien_Event_Observer $observer observer object + * + * @return FireGento_Pdf_Model_Observer + */ + protected function _addShipmentComments(Varien_Event_Observer $observer) + { + if (!Mage::getStoreConfigFlag('sales_pdf/shipment/show_comments')) { + return $this; + } + + /** @var Mage_Sales_Model_Order_Shipment $shipment */ + $shipment = $observer->getShipment(); + + /** @var Mage_Sales_Model_Resource_Order_Shipment_Comment_Collection $commentsCollection */ + $commentsCollection = $shipment->getCommentsCollection(); + $commentsCollection->addVisibleOnFrontFilter(); + + $result = $observer->getResult(); + $notes = $result->getNotes(); + + foreach ($commentsCollection as $comment) { + /** @var $comment Mage_Sales_Model_Order_Shipment_Comment */ + $notes[] = $comment->getComment(); + } + + $result->setNotes($notes); + return $this; + } + + /** + * Add notes to credit memo document. + * + * @param Varien_Event_Observer $observer observer object + * + * @return FireGento_Pdf_Model_Observer + */ + public function addCreditmemoNotes(Varien_Event_Observer $observer) + { + $this->_addPaymentMethod($observer, 'creditmemo'); + $this->_addCreditmemoComments($observer); + + return $this; + } + + /** + * Add the credit memo comments + * + * @param Varien_Event_Observer $observer observer object + * + * @return FireGento_Pdf_Model_Observer + */ + protected function _addCreditmemoComments(Varien_Event_Observer $observer) + { + if (!Mage::getStoreConfigFlag('sales_pdf/creditmemo/show_comments')) { + return $this; + } + + /** @var Mage_Sales_Model_Order_Creditmemo $creditmemo */ + $creditmemo = $observer->getCreditmemo(); + + /** @var Mage_Sales_Model_Resource_Order_Creditmemo_Comment_Collection $commentsCollection */ + $commentsCollection = $creditmemo->getCommentsCollection(); + $commentsCollection->addVisibleOnFrontFilter(); + + $result = $observer->getResult(); + $notes = $result->getNotes(); + + foreach ($commentsCollection as $comment) { + /** @var $comment Mage_Sales_Model_Order_Creditmemo_Comment */ + $notes[] = $comment->getComment(); + } + + $result->setNotes($notes); + return $this; + } + + /** + * Adds a barcode representing the order number to the invoice if activated + * + * @param Varien_Event_Observer $observer observer which is passed by magento + * + * @return FireGento_Pdf_Model_Observer + */ + public function addInvoiceBarcode(Varien_Event_Observer $observer) + { + if (!Mage::getStoreConfigFlag('sales_pdf/invoice/order_id_as_barcode')) { + return $this; + } + + return $this->_addBarcode($observer); + } + + /** + * Adds a barcode representing the order number to the shipment if activated + * + * @param Varien_Event_Observer $observer observer which is passed by magento + * + * @return FireGento_Pdf_Model_Observer + */ + public function addShipmentBarcode(Varien_Event_Observer $observer) { if (!Mage::getStoreConfigFlag('sales_pdf/shipment/order_id_as_barcode')) { return $this; } + + return $this->_addBarcode($observer); + } + + /** + * Adds a barcode representing the order number to a PDF + * + * @param Varien_Event_Observer $observer observer which is passed by magento + * + * @return FireGento_Pdf_Model_Observer + */ + protected function _addBarcode(Varien_Event_Observer $observer) + { $page = $observer->getPage(); $order = $observer->getOrder(); $barcodeConfig = array( 'drawText' => false, 'orientation' => 90, + 'barHeight' => 25, 'text' => $order->getIncrementId() ); $rendererConfig = array( - 'verticalPosition' => 'middle', - 'moduleSize' => 0.9 + 'verticalPosition' => 'top', + 'moduleSize' => 1 ); // create dummy Zend_Pdf object, which just stores the current page, so that we can pass it in - // Zend_Barcode_Renderer_Pdf->setResource() $pdf = new Zend_Pdf(); $pdf->pages[] = $page; /** @var $renderer Zend_Barcode_Renderer_Pdf */ @@ -216,6 +355,7 @@ public function addBarcode(Varien_Event_Observer $observer) // calculate left offset so that barcode is printed on the right with a little margin $leftOffset = $page->getWidth() - $renderer->getBarcode()->getWidth(true) * $renderer->getModuleSize() - 10; $renderer->setLeftOffset($leftOffset); + $renderer->setTopOffset(50); $renderer->draw(); return $this; } diff --git a/src/app/code/community/FireGento/Pdf/Model/Shipment.php b/src/app/code/community/FireGento/Pdf/Model/Shipment.php index 6b2f749..92e365d 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Shipment.php +++ b/src/app/code/community/FireGento/Pdf/Model/Shipment.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Shipment model rewrite. @@ -26,12 +24,8 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ -class FireGento_Pdf_Model_Shipment +class FireGento_Pdf_Model_Shipment extends Mage_Sales_Model_Order_Pdf_Shipment { /** @@ -39,7 +33,7 @@ class FireGento_Pdf_Model_Shipment * * @var Mage_Sales_Model_Order_Pdf_Abstract */ - private $_engine; + protected $_engine; /** * get pdf rendering engine @@ -52,8 +46,9 @@ protected function getEngine() $modelClass = Mage::getStoreConfig('sales_pdf/shipment/engine'); $engine = Mage::getModel($modelClass); - if (!$engine) { + if (!$engine || $engine instanceof FireGento_Pdf_Model_Shipment) { // Fallback to Magento standard shipment layout. + // use new here to circumvent our own rewrite $engine = new Mage_Sales_Model_Order_Pdf_Shipment(); } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php index fba2ee6..7215e92 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Backend/Font.php @@ -15,10 +15,9 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ - /** * Class FireGento_Pdf_Model_System_Config_Backend_Font * @@ -29,7 +28,7 @@ class FireGento_Pdf_Model_System_Config_Backend_Font extends Mage_Adminhtml_Model_System_Config_Backend_File { - private $_allowedExtensions + protected $_allowedExtensions = array( 'otf', 'ttf', diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php index 84d3ba5..2cfbbe0 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Creditmemo/Engine.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Pdf creation engine source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Creditmemo_Engine { @@ -49,7 +43,7 @@ public function toOptionArray() // load default engines shipped with Mage_Sales and FireGento_Pdf $engines = array( '' => Mage::helper('firegento_pdf')->__('Standard Magento'), - 'firegento_pdf/engine_creditmemo_default' => Mage::helper('firegento_pdf')->__('Standard Germany') + 'firegento_pdf/engine_creditmemo_default' => Mage::helper('firegento_pdf')->__('Standard FireGento') ); // load additional engines provided by third party extensions @@ -69,6 +63,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php new file mode 100644 index 0000000..b0a0c18 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Customer/Number.php @@ -0,0 +1,58 @@ + + * @copyright 2015 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Customer number source model. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + * @copyright 2015 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +class FireGento_Pdf_Model_System_Config_Source_Customer_Number +{ + /** + * Databasefield name for customers increment_id + */ + const CUSTOMER_NUMBER_FIELD_INCREMENT_ID = 'increment_id'; + /** + * Return array of possible positions. + * + * @return array + */ + public function toOptionArray() + { + $selectOptions = array( + '' => Mage::helper('firegento_pdf')->__('Standard (entity_id)'), + self::CUSTOMER_NUMBER_FIELD_INCREMENT_ID => Mage::helper('firegento_pdf') + ->__('Customer Increment ID (increment_id)') + ); + $options = array(); + foreach ($selectOptions as $k => $v) { + $options[] = array( + 'value' => $k, + 'label' => $v + ); + } + + return $options; + } +} diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php index ff49ede..6e632b1 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Headerblocks.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Logo position source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Headerblocks { @@ -54,6 +48,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php index 62f76b7..c9795aa 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Invoice/Engine.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Pdf creation engine source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Invoice_Engine { @@ -49,7 +43,7 @@ public function toOptionArray() // load default engines shipped with Mage_Sales and FireGento_Pdf $engines = array( '' => Mage::helper('firegento_pdf')->__('Standard Magento'), - 'firegento_pdf/engine_invoice_default' => Mage::helper('firegento_pdf')->__('Standard Germany') + 'firegento_pdf/engine_invoice_default' => Mage::helper('firegento_pdf')->__('Standard FireGento') ); // load additional engines provided by third party extensions @@ -69,6 +63,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php index ce91a48..25cb433 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Logo.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Logo position source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Logo { @@ -58,6 +52,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php new file mode 100644 index 0000000..f036513 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/PageSize.php @@ -0,0 +1,53 @@ + + * @copyright 2015 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ + +/** + * Page size source model. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ +class FireGento_Pdf_Model_System_Config_Source_PageSize +{ + /** + * Return array of possible sizes. + * + * @return array + */ + public function toOptionArray() + { + $positions = array( + Zend_Pdf_Page::SIZE_A4 => Mage::helper('firegento_pdf')->__('DIN A4'), + Zend_Pdf_Page::SIZE_LETTER => Mage::helper('firegento_pdf')->__('Letter') + ); + + $options = array(); + foreach ($positions as $k => $v) { + $options[] = array( + 'value' => $k, + 'label' => $v + ); + } + + return $options; + } +} diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php index 1069ee7..e5d21cb 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Payment.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Payment method position source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Payment { @@ -55,6 +49,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php index 4f4356e..3f9c896 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipment/Engine.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Pdf creation engine source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Shipment_Engine { @@ -49,7 +43,7 @@ public function toOptionArray() // load default engines shipped with Mage_Sales and FireGento_Pdf $engines = array( '' => Mage::helper('firegento_pdf')->__('Standard Magento'), - 'firegento_pdf/engine_shipment_default' => Mage::helper('firegento_pdf')->__('Standard Germany') + 'firegento_pdf/engine_shipment_default' => Mage::helper('firegento_pdf')->__('Standard FireGento') ); // load additional engines provided by third party extensions @@ -69,6 +63,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php index d8329b5..5493b0b 100644 --- a/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php +++ b/src/app/code/community/FireGento/Pdf/Model/System/Config/Source/Shipping.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /** * Shipping method position source model. @@ -26,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_System_Config_Source_Shipping { @@ -55,6 +49,7 @@ public function toOptionArray() 'label' => $v ); } + return $options; } } diff --git a/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php b/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php index 87f2ac3..e939973 100644 --- a/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php +++ b/src/app/code/community/FireGento/Pdf/Model/Tax/Sales/Pdf/Grandtotal.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ /** @@ -24,10 +24,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Model_Tax_Sales_Pdf_Grandtotal extends Mage_Tax_Model_Sales_Pdf_Grandtotal { @@ -56,6 +52,7 @@ public function getTotalsForDisplay() if (!$config->displaySalesTaxWithGrandTotal($store)) { return parent::getTotalsForDisplay(); } + $amount = $this->getOrder()->formatPriceTxt($this->getAmount()); $amountExclTax = $this->getAmount() - $this->getSource()->getTaxAmount(); $amountExclTax = ($amountExclTax > 0) ? $amountExclTax : 0; diff --git a/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php b/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php index 07c9d97..7e8920e 100644 --- a/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php +++ b/src/app/code/community/FireGento/Pdf/Test/Model/CreditmemoTest.php @@ -1,9 +1,33 @@ + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Test class for creditmemos. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ class FireGento_Pdf_Test_Model_CreditmemoTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract { - protected $class = 'FireGento_Pdf_Model_Creditmemo'; + protected $_class = 'FireGento_Pdf_Model_Creditmemo'; public function getEngineXmlConfigPath() { @@ -19,4 +43,4 @@ public function getOrderObjectClassName() { return 'Mage_Sales_Model_Order_Creditmemo'; } -} \ No newline at end of file +} diff --git a/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php b/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php index 1f0f474..0ebd34c 100644 --- a/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php +++ b/src/app/code/community/FireGento/Pdf/Test/Model/InvoiceTest.php @@ -1,9 +1,33 @@ + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Test class for invoices. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ class FireGento_Pdf_Test_Model_InvoiceTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract { - protected $class = 'FireGento_Pdf_Model_Invoice'; + protected $_class = 'FireGento_Pdf_Model_Invoice'; public function getEngineXmlConfigPath() { @@ -19,4 +43,4 @@ public function getOrderObjectClassName() { return 'Mage_Sales_Model_Order_Invoice'; } -} \ No newline at end of file +} diff --git a/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php b/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php index 929f132..4ab8fbd 100644 --- a/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php +++ b/src/app/code/community/FireGento/Pdf/Test/Model/SalesObjectTestAbstract.php @@ -1,17 +1,41 @@ + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Abstract test class for the different engines. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ abstract class FireGento_Pdf_Test_Model_SalesObjectTestAbstract extends EcomDev_PHPUnit_Test_Case { - protected $class = ''; + protected $_class = ''; /** * @test */ public function itShouldExist() { - $this->assertTrue(class_exists($this->class)); + $this->assertTrue(class_exists($this->_class)); } /** @@ -21,15 +45,15 @@ public function itShouldExist() public function itShouldHaveAMethodGetEngine() { try { - new ReflectionMethod($this->class, 'getEngine'); + new ReflectionMethod($this->_class, 'getEngine'); } catch (ReflectionException $e) { $this->fail($e->getMessage()); } } - abstract function getEngineXmlConfigPath(); + abstract public function getEngineXmlConfigPath(); - abstract function getExpectedDefaultEngineClass(); + abstract public function getExpectedDefaultEngineClass(); abstract public function getOrderObjectClassName(); @@ -39,8 +63,8 @@ abstract public function getOrderObjectClassName(); */ public function itShouldReturnADefaultEngineModel() { - $this->app()->getStore()->setConfig($this->getEngineXmlConfigPath(), 'invalid'); - $instance = new $this->class; + static::app()->getStore()->setConfig($this->getEngineXmlConfigPath(), 'invalid'); + $instance = new $this->_class; $result = $this->callMethod($instance, 'getEngine'); $this->assertInstanceOf($this->getExpectedDefaultEngineClass(), $result); } @@ -51,7 +75,7 @@ public function itShouldReturnADefaultEngineModel() */ public function itShouldhaveAMethodGetPdf() { - $instance = new $this->class; + $instance = new $this->_class; $this->assertTrue(is_callable(array($instance, 'getPdf'))); } @@ -61,12 +85,15 @@ public function itShouldhaveAMethodGetPdf() */ public function itShouldReturnAZendPdf() { - $instance = new $this->class; - + $instance = new $this->_class; + $mockAddress = $this->getMock('Mage_Sales_Model_Order_Address'); - $mockPaymentMethod = $this->getMockForAbstractClass('Mage_Payment_Model_Method_Abstract'); - + $mockPaymentMethod = $this->getMock('Mage_Payment_Model_Method_Abstract'); + $mockPaymentMethod->expects($this->any()) + ->method('getInfoBlockType') + ->will($this->returnValue('payment/info')); + $mockPaymentInfo = $this->getMock('Mage_Sales_Model_Order_Payment'); $mockPaymentInfo->expects($this->any()) ->method('getMethodInstance') @@ -79,7 +106,7 @@ public function itShouldReturnAZendPdf() $mockOrder->expects($this->any()) ->method('getShippingAddress') ->will($this->returnValue($mockAddress)); - + $mockOrder->expects($this->any()) ->method('getPayment') ->will($this->returnValue($mockPaymentInfo)); @@ -93,8 +120,11 @@ public function itShouldReturnAZendPdf() $mockObj->expects($this->any()) ->method('getAllItems') ->will($this->returnValue(array())); - + + $currentArea = Mage::getDesign()->getArea(); + Mage::getDesign()->setArea('adminhtml'); $result = $instance->getPdf(array($mockObj)); + Mage::getDesign()->setArea($currentArea); $this->assertInstanceOf('Zend_Pdf', $result); } @@ -109,4 +139,4 @@ protected function callMethod($object, $method, array $args = null) return $method->invoke($object); } } -} \ No newline at end of file +} diff --git a/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php b/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php index d8eb920..146b795 100644 --- a/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php +++ b/src/app/code/community/FireGento/Pdf/Test/Model/ShipmentTest.php @@ -1,13 +1,37 @@ + * @copyright 2014 FireGento Team (http://www.firegento.com) + * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) + */ +/** + * Test class for shipments. + * + * @category FireGento + * @package FireGento_Pdf + * @author FireGento Team + */ class FireGento_Pdf_Test_Model_ShipmentTest extends FireGento_Pdf_Test_Model_SalesObjectTestAbstract { - protected $class = 'FireGento_Pdf_Model_Shipment'; + protected $_class = 'FireGento_Pdf_Model_Shipment'; public function getEngineXmlConfigPath() { - return 'sales_pdf/invoice/shipment'; + return 'sales_pdf/shipment/engine'; } public function getExpectedDefaultEngineClass() @@ -19,4 +43,4 @@ public function getOrderObjectClassName() { return 'Mage_Sales_Model_Order_Shipment'; } -} \ No newline at end of file +} diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php new file mode 100644 index 0000000..8a52a4d --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/CreditmemoController.php @@ -0,0 +1,45 @@ +getRequest()->getPost('creditmemo_ids'); + if (count($creditmemosIds) > 1) { + $invoices = Mage::getResourceModel('sales/order_creditmemo_collection') + ->addAttributeToSelect('*') + ->addAttributeToFilter('entity_id', array('in' => $creditmemosIds)) + ->load(); + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices); + } else { + $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('creditmemo'), + $pdf->render(), 'application/pdf' + ); + } else if (count($creditmemosIds) == 1) { + $creditmemoId = $creditmemosIds[0]; + if ($invoice = Mage::getModel('sales/order_creditmemo') + ->load($creditmemoId) + ) { + $pdf = Mage::getModel('sales/order_pdf_creditmemo') + ->getPdf(array($invoice)); + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('creditmemo', $invoice), + $pdf->render(), 'application/pdf' + ); + } + } + + $this->_redirect('*/*/'); + } +} diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php new file mode 100644 index 0000000..41f6ee0 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/InvoiceController.php @@ -0,0 +1,45 @@ +getRequest()->getPost('invoice_ids'); + if (count($invoicesIds) > 1) { + $invoices = Mage::getResourceModel('sales/order_invoice_collection') + ->addAttributeToSelect('*') + ->addAttributeToFilter('entity_id', array('in' => $invoicesIds)) + ->load(); + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices); + } else { + $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('invoice'), + $pdf->render(), 'application/pdf' + ); + } else if (count($invoicesIds) == 1) { + $invoiceId = $invoicesIds[0]; + if ($invoice = Mage::getModel('sales/order_invoice') + ->load($invoiceId) + ) { + $pdf = Mage::getModel('sales/order_pdf_invoice') + ->getPdf(array($invoice)); + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('invoice', $invoice), + $pdf->render(), 'application/pdf' + ); + } + } + + $this->_redirect('*/*/'); + } +} diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php index 2e02a6e..2c72c8f 100644 --- a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/CreditmemoController.php @@ -15,9 +15,10 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ + require('Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php'); /** diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php index bd54705..0ede99f 100644 --- a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/InvoiceController.php @@ -15,7 +15,7 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php index d813749..eaf67cf 100644 --- a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/Order/ShipmentController.php @@ -15,7 +15,7 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) */ diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php new file mode 100644 index 0000000..bd5dc73 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/OrderController.php @@ -0,0 +1,163 @@ +getRequest()->getPost('order_ids'); + $flag = false; + if (!empty($orderIds)) { + $invoice = null; + foreach ($orderIds as $orderId) { + $invoices = Mage::getResourceModel('sales/order_invoice_collection') + ->setOrderFilter($orderId) + ->load(); + if ($invoices->getSize() == 1) { + $invoice = $invoices->getFirstItem(); + } + + if ($invoices->getSize() > 0) { + $flag = true; + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices); + } else { + $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + // there is more than one invoice + $invoice = null; + } + } + } + + if ($flag) { + if ($invoice != null) { + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('invoice', $invoice), + $pdf->render(), 'application/pdf' + ); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('invoice'), + $pdf->render(), 'application/pdf' + ); + } else { + $this->_getSession()->addError( + $this->__('There are no printable documents related to selected orders.') + ); + $this->_redirect('*/*/'); + } + } + + $this->_redirect('*/*/'); + } + + public function pdfshipmentsAction() + { + $orderIds = $this->getRequest()->getPost('order_ids'); + $flag = false; + if (!empty($orderIds)) { + $shipment = null; + foreach ($orderIds as $orderId) { + $shipments = Mage::getResourceModel('sales/order_shipment_collection') + ->setOrderFilter($orderId) + ->load(); + if ($shipments->getSize() == 1) { + $shipment = $shipments->getFirstItem(); + } + + if ($shipments->getSize() > 0) { + $flag = true; + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments); + } else { + $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + // there is more than one invoice + $shipment = null; + } + } + } + + if ($flag) { + if ($shipment != null) { + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('shipment', $shipment), + $pdf->render(), 'application/pdf' + ); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('shipment'), + $pdf->render(), 'application/pdf' + ); + } else { + $this->_getSession()->addError( + $this->__('There are no printable documents related to selected orders.') + ); + $this->_redirect('*/*/'); + } + } + + $this->_redirect('*/*/'); + } + + public function pdfcreditmemosAction() + { + $orderIds = $this->getRequest()->getPost('order_ids'); + $flag = false; + if (!empty($orderIds)) { + $creditmemo = null; + foreach ($orderIds as $orderId) { + $creditmemos = Mage::getResourceModel('sales/order_creditmemo_collection') + ->setOrderFilter($orderId) + ->load(); + if ($creditmemos->getSize() == 1) { + $creditmemo = $creditmemos->getFirstItem(); + } + + if ($creditmemos->getSize() > 0) { + $flag = true; + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos); + } else { + $pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($creditmemos); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + // there is more than one invoice + $creditmemo = null; + } + } + } + + if ($flag) { + if ($creditmemo != null) { + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('creditmemo', $creditmemo), + $pdf->render(), 'application/pdf' + ); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('creditmemo'), + $pdf->render(), 'application/pdf' + ); + } else { + $this->_getSession()->addError( + $this->__('There are no printable documents related to selected orders.') + ); + $this->_redirect('*/*/'); + } + } + + $this->_redirect('*/*/'); + } +} diff --git a/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php new file mode 100644 index 0000000..ce8ce18 --- /dev/null +++ b/src/app/code/community/FireGento/Pdf/controllers/Adminhtml/Sales/ShipmentController.php @@ -0,0 +1,45 @@ +getRequest()->getPost('shipment_ids'); + if (count($shipmentIds) > 1) { + $shipments = Mage::getResourceModel('sales/order_shipment_collection') + ->addAttributeToSelect('*') + ->addAttributeToFilter('entity_id', array('in' => $shipmentIds)) + ->load(); + if (!isset($pdf)) { + $pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments); + } else { + $pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments); + $pdf->pages = array_merge($pdf->pages, $pages->pages); + } + + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilenameForMultipleDocuments('shipment'), + $pdf->render(), 'application/pdf' + ); + } else if (count($shipmentIds) == 1) { + $shipmentId = $shipmentIds[0]; + if ($shipment = Mage::getModel('sales/order_shipment') + ->load($shipmentId) + ) { + $pdf = Mage::getModel('sales/order_pdf_shipment') + ->getPdf(array($shipment)); + return $this->_prepareDownloadResponse( + Mage::helper('firegento_pdf') + ->getExportFilename('shipment', $shipment), + $pdf->render(), 'application/pdf' + ); + } + } + + $this->_redirect('*/*/'); + } +} diff --git a/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php b/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php index 57dc483..87c6135 100644 --- a/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php +++ b/src/app/code/community/FireGento/Pdf/controllers/Sales/OrderController.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ require_once 'Mage/Sales/controllers/OrderController.php'; @@ -29,10 +27,6 @@ * @category FireGento * @package FireGento_Pdf * @author FireGento Team - * @copyright 2013 FireGento Team (http://www.firegento.com) - * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ class FireGento_Pdf_Sales_OrderController extends Mage_Sales_OrderController { @@ -88,6 +82,7 @@ public function printDocument($type) if (!in_array($type, $this->_types)) { Mage::throwException('Type not found in type table.'); } + /* @var $order Mage_Sales_Model_Order */ $documentId = (int)$this->getRequest()->getParam($type . '_id'); $document = null; @@ -110,9 +105,16 @@ public function printDocument($type) ->addAttributeToSelect('*') ->addAttributeToFilter('order_id', $orderId) ->load(); + if (count($documentsCollection) == 1) { + $filename = Mage::helper('firegento_pdf') + ->getExportFilename($type, $documentsCollection->getFirstItem()); + } else { + $filename = Mage::helper('firegento_pdf')->getExportFilenameForMultipleDocuments($type); + } } else { // Create a single $type pdf. $documentsCollection = array($document); + $filename = Mage::helper('firegento_pdf')->getExportFilename($type, $document); } // Store current area and set to adminhtml for $type generation. @@ -123,12 +125,11 @@ public function printDocument($type) $pdfGenerator = Mage::getModel('sales/order_pdf_' . $type); $pdf = $pdfGenerator->getPdf($documentsCollection); $this->_prepareDownloadResponse( - Mage::helper('firegento_pdf')->getExportFilename($type, $document), $pdf->render(), 'application/pdf' + $filename, $pdf->render(), 'application/pdf' ); // Restore area. Mage::getDesign()->setArea($currentArea); - } else { if (Mage::getSingleton('customer/session')->isLoggedIn()) { $this->_redirect('*/*/history'); diff --git a/src/app/code/community/FireGento/Pdf/etc/config.xml b/src/app/code/community/FireGento/Pdf/etc/config.xml index 23529af..bd63525 100644 --- a/src/app/code/community/FireGento/Pdf/etc/config.xml +++ b/src/app/code/community/FireGento/Pdf/etc/config.xml @@ -1,8 +1,27 @@ + - 1.3.0 + 1.4.0 @@ -53,15 +72,31 @@ firegento_pdf/observer - addShippingMethod + addShipmentNotes + + + + firegento_pdf/observer + addCreditmemoNotes + + + + + + + firegento_pdf/observer + addInvoiceBarcode + + + firegento_pdf/observer - addBarcode + addShipmentBarcode @@ -127,11 +162,29 @@ + 100 left + + 595:842: + + 0 + + + + + + 000000 + 666666 + eeeeee +
                                                                          888888
                                                                          +
                                                                          - + firegento_pdf/engine_invoice_default 1 + + 0 + - 0 @@ -140,22 +193,32 @@ price_incl_tax,qty,tax,subtotal_incl_tax 0 + 0 + + + - + firegento_pdf/engine_shipment_default 1 + 0 + 0 0 + + - + firegento_pdf/engine_creditmemo_default 1 + + 0 + 0 + + - - 100 -
                                                                          diff --git a/src/app/code/community/FireGento/Pdf/etc/system.xml b/src/app/code/community/FireGento/Pdf/etc/system.xml index 8abcd32..393c72a 100644 --- a/src/app/code/community/FireGento/Pdf/etc/system.xml +++ b/src/app/code/community/FireGento/Pdf/etc/system.xml @@ -1,9 +1,9 @@ @@ -52,6 +48,178 @@ + + + text + 100 + 1 + 1 + 1 + 0 + + + + text + 100 + 1 + 1 + 1 + Show address above shipping/invoice address + + + + select + adminhtml/system_config_source_yesno + 200 + 1 + 1 + 1 + MageSetup or GermanSetup (not anymore maintained, replaced by MageSetup)]]> + + + + select + firegento_pdf/system_config_source_logo + 300 + 1 + 1 + 1 + + + + + text + validate-number-range number-range-1-100 + 400 + 1 + 1 + 1 + + + + + select + firegento_pdf/system_config_source_headerblocks + 500 + 1 + 1 + 1 + + + + + select + firegento_pdf/system_config_source_pageSize + 600 + 1 + 1 + 1 + + + + + + text + 200 + 1 + 1 + 1 + + + + adminhtml/system_config_source_yesno + select + 400 + 1 + 1 + 1 + + + + + file + firegento_pdf/system_config_backend_font + media/firegento_pdf/fonts + 500 + 1 + 1 + 1 + + 1 + + + + + file + firegento_pdf/system_config_backend_font + media/firegento_pdf/fonts + 600 + 1 + 1 + 1 + + 1 + + + + + file + firegento_pdf/system_config_backend_font + media/firegento_pdf/fonts + 700 + 1 + 1 + 1 + + 1 + + + + + + + text + 210 + 1 + 1 + 1 + + + + + text + 10 + 1 + 1 + 1 + + + + + text + 20 + 1 + 1 + 1 + + + + text + 30 + 1 + 1 + 1 + +
                                                                          + + text + 40 + 1 + 1 + 1 +
                                                                          +
                                                                          +
                                                                          300 @@ -73,7 +241,35 @@ 1 1 - + + + + 36 + 1 + 1 + 1 + 1 + + + + select + adminhtml/system_config_source_yesno + 45 + 1 + 1 + 1 + + + + select + firegento_pdf/system_config_source_customer_number + 36 + 1 + 1 + 1 + 1 + + select adminhtml/system_config_source_yesno @@ -112,7 +308,7 @@ 1 Position of shipping method on invoice. - + select adminhtml/system_config_source_yesno @@ -130,7 +326,7 @@ 1 Printed on every invoice. - + firegento_pdf/adminhtml_columnOrder 80 @@ -147,6 +343,16 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 100 + 1 + 1 + 1 + Prints the order ID as a barcode on the right hand side. + text @@ -156,6 +362,25 @@ 1 available placeholders: {{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like "%Y" + + + text + 140 + 1 + 1 + 1 + available placeholder: strftime() date formats like "%Y" + + + + firegento_pdf/adminhtml_system_config_form_field_notes + adminhtml/system_config_backend_serialized_array + 160 + 1 + 1 + 1 + Here you can add notes to the invoice based on the shipping country of the order. + @@ -179,6 +404,24 @@ 1 1 + + + + 36 + 1 + 1 + 1 + 1 + + + + select + adminhtml/system_config_source_yesno + 45 + 1 + 1 + 1 + select @@ -189,10 +432,28 @@ 1 Position of shipping method on shipment. + + + select + adminhtml/system_config_source_yesno + 60 + 1 + 1 + 1 + + + + select + adminhtml/system_config_source_yesno + 70 + 1 + 1 + 1 + textarea - 70 + 80 1 1 1 @@ -217,6 +478,15 @@ 1 available placeholders: {{shipment_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like "%Y" + + + text + 140 + 1 + 1 + 1 + available placeholder: strftime() date formats like "%Y" + @@ -240,141 +510,72 @@ 1 1 - - - textarea - 50 + + + + 36 1 1 1 - Printed on every credit memo. - - - - text - 120 - 1 - 1 - 1 - available placeholders: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like "%Y" - - - - - - text - 100 - 1 - 1 - 1 - 0 - - - - text - 100 - 1 - 1 - 1 - Show address above shipping/invoice address - - - + 1 + + + select - adminhtml/system_config_source_yesno - MageSetup or GermanSetup (not anymore maintained, replaced by MageSetup)]]> - 200 + firegento_pdf/system_config_source_payment + 40 1 1 1 - - - + Position of payment method on creditmemo. + + + select - firegento_pdf/system_config_source_logo - 300 - 1 - 1 - 1 - - - - - text - validate-number-range number-range-1-100 - 400 + adminhtml/system_config_source_yesno + 45 1 1 1 - - - - + + + select - firegento_pdf/system_config_source_headerblocks - - - - - - - text - 200 - 1 - 1 - 1 - - - - adminhtml/system_config_source_yesno - select - 400 + 60 1 1 1 - - - - file - firegento_pdf/system_config_backend_font - media/firegento_pdf/fonts - 500 + + + + textarea + 50 1 1 1 - - 1 - - - - - file - firegento_pdf/system_config_backend_font - media/firegento_pdf/fonts - 600 + Printed on every credit memo. + + + + text + 120 1 1 1 - - 1 - - - - - file - firegento_pdf/system_config_backend_font - media/firegento_pdf/fonts - 700 + available placeholders: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like "%Y" + + + + text + 140 1 1 1 - - 1 - - + available placeholder: strftime() date formats like "%Y" + - +
                                                                          diff --git a/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php b/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php index 324a0c7..80ef058 100644 --- a/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php +++ b/src/app/code/community/FireGento/Pdf/sql/firegento_pdf_setup/upgrade-1.0.0-1.1.0.php @@ -1,8 +1,8 @@ - * @copyright 2013 FireGento Team (http://www.firegento.com) + * @copyright 2014 FireGento Team (http://www.firegento.com) * @license http://opensource.org/licenses/gpl-3.0 GNU General Public License, version 3 (GPLv3) - * @version $Id:$ - * @since 0.1.0 */ /* @var $this Mage_Eav_Model_Entity_Setup */ diff --git a/src/app/etc/modules/FireGento_Pdf.xml b/src/app/etc/modules/FireGento_Pdf.xml index c872abd..cb66641 100644 --- a/src/app/etc/modules/FireGento_Pdf.xml +++ b/src/app/etc/modules/FireGento_Pdf.xml @@ -1,4 +1,23 @@ + diff --git a/src/app/locale/de_AT/FireGento_Pdf.csv b/src/app/locale/de_AT/FireGento_Pdf.csv index 9c650ea..674c135 100644 --- a/src/app/locale/de_AT/FireGento_Pdf.csv +++ b/src/app/locale/de_AT/FireGento_Pdf.csv @@ -1,2 +1 @@ "VAT-ID","UID" -"Standard Germany","Standard Deutsch" diff --git a/src/app/locale/de_CH/FireGento_Pdf.csv b/src/app/locale/de_CH/FireGento_Pdf.csv index 1bc9820..0c2e67d 100644 --- a/src/app/locale/de_CH/FireGento_Pdf.csv +++ b/src/app/locale/de_CH/FireGento_Pdf.csv @@ -58,12 +58,13 @@ "Center","Mittig" "Right","Rechts" "Standard Magento","Standard Magento" -"Standard Germany","Standard Deutschland" +"Standard FireGento","Standard FireGento" "Show Payment Method","Zahlungsart andrucken" "Hide payment method","Nicht andrucken" "Header","Dokumenten-Kopf" "Notes area","Notizbereich" "Position of payment method on invoice.","Position der Zahlungart auf der Rechnung." +"Position of payment method on creditmemo.","Position der Zahlungart auf der Gutschrift." "Show Shipping Method","Versandart andrucken" "Hide shipping method","Nicht andrucken" "Position of shipping method on invoice.","Position der Versandart auf der Rechnung." @@ -78,11 +79,21 @@ "Order of price columns of items","Reihenfolge der Spalten in der Artikelliste" "Define the order by moving the following items using your mouse:","Legen Sie die Reihenfolge durch Verschieben der Einträge mit der Maus fest:" "Tax rate","Steuersatz" -"Total (incl. tax)","Gesamt (brutto)" +"Total (incl. tax)","Gesamt (Brutto)" "Show Date Notice","Anzeige des Datum im Notizbereich" "Show Notice: Invoice date is equal to delivery date.","Zeige im Notizbereich: Rechnungsdatum ist gleich dem Lieferdatum." "Show Customer Number","Kundennummer andrucken" +"Customer number for guest orders","Kundennummer für Gastbestellungen" +"Guest orders don't have a customer no., this text is displayed instead. Leave blank to hide customer no. completely.","Gastbestellungen haben keine Kundennummer, dieser Text wird stattdessen angezeigt. Leer lassen, um keine Kundennummer anzuzeigen." "Full width","volle Breite" "Full width means that the logo starts at the upper left corner and is drawn to the right edge. There is no left or right margin for printing.","""volle Breite"" bedeutet, dass das Logo über die komplette Seite von oben links bis zum rechten Rand gezogen wird. Es verbleibt kein Druckrand." "Show Order ID as Barcode","Bestellnummer als Barcode anzeigen" "Prints the order ID as a barcode on the right hand side.","Zeigt die Bestellnummer als Barcode auf der rechten Seite an." +"Show Shipping and Tracking Information","Zeige Versand- und Trackinginformationen" +"Colors for PDF Creation","Farben für PDF Erstellung" +"Base text color","Textfarbe" +"Label color","Bezeichner" +"Table header background","Tabellenkopf Hintergrund" +"Footer","Footer" +"6 digit HEX-code, eg. FF0000 for red","6-stelliger HEX-Code, z.B. FF0000 für Rot" +"Labels like Customer No., Customer IP, Order number, etc.","Bezeichner wie z.B. Kundennummer, IP-Adresse, Bestellnummer, usw." diff --git a/src/app/locale/de_DE/FireGento_Pdf.csv b/src/app/locale/de_DE/FireGento_Pdf.csv index 2d83021..3d53540 100644 --- a/src/app/locale/de_DE/FireGento_Pdf.csv +++ b/src/app/locale/de_DE/FireGento_Pdf.csv @@ -1,94 +1,138 @@ -"Invoice maturity: %s days","Fälligkeit der Rechnung: %s Tage" -"Invoice Maturity","Fälligkeit der Rechnung" -"Days after the invoice is due. Leave this field blank to hide the message on the invoice.","Tage, nach denen die Rechnung fällig ist. Feld leer lassen, um den Text auf der Rechnung zu verbergen." -"Invoice is payable immediately","Die Rechnung ist sofort fällig." -"Invoice date is equal to delivery date.","Rechnungsdatum ist gleich dem Lieferdatum." -"Payment method:","Zahlungsart:" -"Shipping method:","Versandart:" -"Payment method: %s","Zahlungsart: %s" -"Shipping method: %s","Versandart: %s" -"Page","Seite" -"Telephone:","Telefon:" -"Fax:","Fax:" -"E-Mail:","E-Mail:" -"Web:","Web:" -"Bank name:","Kreditinstitut:" +"6 digit HEX-code, eg. FF0000 for red","6-stelliger HEX-Code, z.B. FF0000 für Rot" +"Account owner:","Kontoinhaber:" "Account:","Kontonummer:" +"Add Note","Notiz hinzufügen" +"Add notes based on the shipping country","Notizen abhängig vom Versandland hinzufügen" +"available placeholder: strftime() date formats like ""%Y""","Verfügbare Platzhalter: strftime() Datumsformat, wie z.B. ""%Y""" +"available placeholders: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Verfügbare Platzhalter: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} und strftime() Datumsformats,wie z.B ""%Y""" +"available placeholders: {{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Verfügbare Platzhalter: {{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} und strftime() Datumsformats,wie z.B ""%Y""" +"available placeholders: {{shipment_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Verfügbare Platzhalter: {{shipment_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} und strftime() Datumsformats,wie z.B ""%Y""" +"Bank name:","Kreditinstitut:" "Bank number:","BLZ:" -"Account owner:","Kontoinhaber:" -"SWIFT:","SWIFT:" -"IBAN:","IBAN:" -"Tax number:","Steuernummer:" -"VAT-ID:","USt-IdNr.:" -"Register number:","HRB Nummer:" +"Base text color","Textfarbe" +"Bold font","fette Schrift" +"Caution: Your columns may overlap!","Vorsicht! Die Spalten könnten überlappen." +"Center","Mittig" "CEO:","Geschäftsführer:" -"Pos","Pos." -"No.","Artikelnummer" -"Description","Beschreibung" -"Price (excl. tax)","Preis (Netto)" -"Amount","Betrag" -"Tax","USt." -"Total","Summe" -"Invoice","Rechnung" +"Creditmemo","Rechnungskorrektur" +"Creditmemo number:","Rechnungskorr. Nr.:" +"Colors for PDF Creation","Farben für PDF Erstellung" "Creditmemo","Gutschrift" -"Order number:","Bestellnummer:" -"Invoice number:","Rechnungsnummer:" -"Shipment number:","Lieferscheinnummer:" "Creditmemo number:","Gutschriftsnummer:" -"Customer number:","Kundennummer:" "Customer IP:","Kunden IP:" -"Invoice date:","Rechnungsdatum:" -"Shipping date:","Versanddatum:" +"Customer number:","Kundennummer:" +"Customer number for guest orders","Kundennummer für Gastbestellungen" "Date:","Datum:" -"Additional tax %s","Zusätzliche Steuern %s" -"Subtotal:","Zwischensumme:" -"Shipping:","Versand:" +"Days after the invoice is due. Leave this field blank to hide the message on the invoice.","Tage, nach denen die Rechnung fällig ist. Feld leer lassen, um den Text auf der Rechnung zu verbergen." +"Define the order by moving the following items using your mouse:","Legen Sie die Reihenfolge durch Verschieben der Einträge mit der Maus fest:" +"Description","Beschreibung" +"DIN A4","DIN A4" +"Display Tax Total if display Summary is on","Zeige Summe der Steuern, wenn Zusammenfassung aktiviert ist" +"E-Mail:","E-Mail:" +"Fax:","Fax:" +"Filename Export Pattern","Musterdateiname" +"Filename Export Pattern for Multiple Documents","Musterdateiname für das Exportieren mehrerer Dokumente" +"Fonts for PDF Creation","Schriftarten für PDF Erstellung" +"Footer","Footer" +"Full width","volle Breite" +"Full width means that the logo starts at the upper left corner and is drawn to the right edge. There is no left or right margin for printing.","""volle Breite"" bedeutet, dass das Logo über die komplette Seite von oben links bis zum rechten Rand gezogen wird. Es verbleibt kein Druckrand." +"Grand Total (Excl. Tax)","Gesamtsumme (Netto)" +"Grand Total (Incl. Tax)","Gesamtsumme (Brutto)" "Grand Total:","Gesamtsumme:" +"Guest orders don't have a customer no., this text is displayed instead. Leave blank to hide customer no. completely.","Gastbestellungen haben keine Kundennummer, dieser Text wird stattdessen angezeigt. Leer lassen, um keine Kundennummer anzuzeigen." "Guestorder","Gastbestellung" -"PDF Engine","PDF Engine" -"Note","Notiz" -"Printed on every invoice.","Wird auf jede Rechnung gedruckt." -"Printed on every shipment.","Wird auf jeden Lieferschein gedruckt." -"Printed on every credit memo.","Wird auf jede Gutschrift gedruckt." -"PDF Creation","PDF Erstellung" -"Sender Address Bar","Absenderadresse" -"Show Footer","Zeige Footer" -"Logo Position","Logo Position" -"Left","Links" -"Center","Mittig" -"Right","Rechts" -"Standard Magento","Standard Magento" -"Standard Germany","Standard Deutschland" -"Show Payment Method","Zahlungsart anzeigen" -"Hide payment method","Nicht anzeigen" "Header","Dokumenten-Kopf" +"Header Blocks Position","Position des Adress- und Informationsblock" +"Here you can add notes to the invoice based on the shipping country of the order.","Hier können Sie Rechnungsnotizen basierend auf dem Versandland hinzufügen." +"Hide Grand Total excl. Tax if display Summary is on","Verstecke Gesamtsumme exkl. Steuern, wenn Steuerzusammenfassung aktiviert ist" +"Hide payment method","Nicht anzeigen" +"Hide shipping method","Nicht anzeigen" +"IBAN:","IBAN:" +"Invalid draw line data. Please define ""lines"" array","Unzulässige Daten zum schreiben der Zeile. Bitte ein ""lines"" array definieren." +"Invoice","Rechnung" +"Invoice date is equal to delivery date.","Rechnungsdatum ist gleich dem Lieferdatum." +"Invoice date:","Rechnungsdatum:" +"Invoice is payable immediately","Die Rechnung ist sofort fällig." +"Invoice Maturity","Fälligkeit der Rechnung" +"Invoice maturity: %s days","Fälligkeit der Rechnung: %s Tage" +"Invoice number:","Rechnungsnummer:" +"Italic font","kursive Schriftart" +"Label color","Bezeichner" +"Labels like Customer No., Customer IP, Order number, etc.","Bezeichner wie z.B. Kundennummer, IP-Adresse, Bestellnummer, usw." +"Left","Links" +"Left: Customer address left, Invoice details right. Right: Invoice details left, Customer address right.","Links: Kundenadresse links, Rechnungsdetails rechts. Rechts: Rechnungsdetails links, Kundenadresse rechts" +"Logo Position","Logo Position" +"N/A","Nicht verfügbar" +"No.","Artikelnummer" +"not to be listed","nicht aufzulisten" +"Note","Notiz" "Notes area","Notizbereich" +"Order number:","Bestellnummer:" +"Order of price columns of items","Reihenfolge der Spalten in der Artikelliste" +"Packingslip","Packzettel" +"Page","Seite" +"Page Size","Seitenformat" +"Payment method:","Zahlungsart:" +"Payment method: %s","Zahlungsart: %s" +"PDF Creation","PDF Erstellung" +"PDF Engine","PDF Engine" +"Pos","Pos." "Position of payment method on invoice.","Position der Zahlungart auf der Rechnung." -"Show Shipping Method","Versandart anzeigen" -"Hide shipping method","Nicht anzeigen" +"Position of payment method on creditmemo.","Position der Zahlungart auf der Gutschrift." "Position of shipping method on invoice.","Position der Versandart auf der Rechnung." "Position of shipping method on shipment.","Position der Versandart auf dem Lieferschein." -"not to be listed","nicht aufzulisten" -"Show Invoice Comments","Rechnungskommentare anzeigen" -"Show Item Discount","Rabatt auf Artikelebene anzeigen" -"You get a discount of %s.","Sie erhalten einen Rabatt von %s." -"Tax amount","Steuerbetrag" +"Price","Preis" +"Price (excl. tax)","Preis (Netto)" "Price (incl. tax)","Preis (Brutto)" -"Subtotal (incl. tax)","Zwischensumme (Brutto)" -"Order of price columns of items","Reihenfolge der Spalten in der Artikelliste" -"Define the order by moving the following items using your mouse:","Legen Sie die Reihenfolge durch Verschieben der Einträge mit der Maus fest:" -"Tax rate","Steuersatz" -"Total (incl. tax)","Gesamt (brutto)" +"Printed on every credit memo.","Wird auf jede Rechnungskorrektur gedruckt." +"Printed on every invoice.","Wird auf jede Rechnung gedruckt." +"Printed on every shipment.","Wird auf jeden Lieferschein gedruckt." +"Prints the order ID as a barcode on the right hand side.","Zeigt die Bestellnummer als Barcode auf der rechten Seite an." +"Qty","Anzahl" +"Register court:","Amtsgericht:" +"Register number:","HRB Nummer:" +"Registered seat:","Sitz:" +"Regular font","normale Schriftart" +"Resize or not the size of your logo in the header. Value possible from 1 (minimum size) to 100 (full size). Values in percent.", +"Right","Rechts" +"Sender Address Bar","Absenderadresse" +"Shipment","Lieferschein" +"Shipment number:","Lieferscheinnummer:" +"Shipping Country","Versandland" +"Shipping date:","Versanddatum:" +"Shipping method:","Versandart:" +"Shipping method: %s","Versandart: %s" +"Show address above shipping/invoice address","Zeige Adresse über Empfängeradresse" +"Show Credit Memo Comments","Kommentare auf Rechnungskorrektur anzeigen" +"Show Customer Number","Kundennummer anzeigen" +"Show Customer TAX/VAT Number","USt-IdNr." "Show Date Notice","Anzeige des Datums im Notizbereich" +"Show Footer","Zeige Footer" +"Show Imprint. Compatible with MageSetup or GermanSetup (not anymore maintained, replaced by MageSetup)","Zeige Impressum, kompatibel mit MageSetup oder GermanSetup (wird nicht mehr weiterentwickelt und wurde ersetzt durch MageSetup)" +"Show Invoice Comments","Rechnungskommentare anzeigen" +"Show Item Discount","Rabatt auf Artikelebene anzeigen" "Show Notice: Invoice date is equal to delivery date.","Zeige im Notizbereich: Rechnungsdatum ist gleich dem Lieferdatum." -"Show Customer Number","Kundennummer anzeigen" -"Full width","volle Breite" -"Full width means that the logo starts at the upper left corner and is drawn to the right edge. There is no left or right margin for printing.","""volle Breite"" bedeutet, dass das Logo über die komplette Seite von oben links bis zum rechten Rand gezogen wird. Es verbleibt kein Druckrand." "Show Order ID as Barcode","Bestellnummer als Barcode anzeigen." -"Prints the order ID as a barcode on the right hand side.","Zeigt die Bestellnummer als Barcode auf der rechten Seite an." -"Left: Customer address left, Invoice details right. Right: Invoice details left, Customer address right.","Links: Kundenadresse links, Rechnungsdetails rechts. Rechts: Rechnungsdetails links, Kundenadresse rechts" -"Show address above shipping/invoice address","Zeige Adresse über Empfängeradresse" -"Fonts for PDF Creation","Schriftarten für PDF Erstellung" -"You can upload your own fonts (*.ttf, *.otf) instead of using Zends Helvetica","Sie können eigene Schriften (*.ttf, *.otf) hochladen, statt Zends Helvetica zu benutzen." -"Registered seat:","Sitz:" -"Register court:","Amtsgericht:" +"Show Payment Method","Zahlungsart anzeigen" +"Show Shipment Comments","Lieferscheinkommentare anzeigen" +"Show Shipping Method","Versandart anzeigen" +"Standard FireGento","Standard FireGento" +"Standard Magento","Standard Magento" +"Subtotal (incl. tax)","Zwischensumme (Brutto)" +"Subtotal:","Zwischensumme:" +"SWIFT:","SWIFT:" +"Table header background","Tabellenkopf Hintergrund" +"Tax","USt." +"Tax amount","Steuerbetrag" +"Tax number:","Steuernummer:" +"Tax rate","Steuersatz" +"Telephone:","Telefon:" +"There are no printable documents related to selected orders","Es wurden keine druckbaren Dokumente für diese Bestellung gefunden." +"Total","Summe" +"Total (incl. tax)","Gesamt (Brutto)" +"Upload own fonts","Eigene Schriftart verwenden" +"VAT-ID:","USt-IdNr.:" +"Web:","Web:" +"You can upload your own fonts (*.ttf) instead of using Zends Helvetica","Sie können eigene Schriften (*.ttf) hochladen, statt Zends Helvetica zu benutzen." +"You get a discount of %s.","Sie erhalten einen Rabatt von %s." +"Show Shipping and Tracking Information","Zeige Versand- und Trackinginformationen" diff --git a/src/app/locale/fr_FR/FireGento_Pdf.csv b/src/app/locale/fr_FR/FireGento_Pdf.csv new file mode 100644 index 0000000..669d332 --- /dev/null +++ b/src/app/locale/fr_FR/FireGento_Pdf.csv @@ -0,0 +1,17 @@ +"Billing address","Adresse de facturation" +"Shipping address","Adresse de livraison" +"Invoice number:","Facture n° :" +"Order number:","Commande n° :" +"Customer number:","N° client :" +"Invoice date:","Date de commande :" +"Facturer","Facture" +"No.","N°" +"Price (incl. tax)","Prix TTC" +"Tax item","TVA" +"Total (incl. tax)","Total" +"Tax","Montant TVA total" +"Tax Section","Montant TVA total" +"Mage_Sales::Tax","Montant TVA total" +"Mage_Sales::Tax Section","Montant TVA total" +"Payment method: %s","Mode de paiement: %s" +"Shipping method: %s","Mode de livraison: %s" diff --git a/src/app/locale/nl_NL/FireGento_Pdf.csv b/src/app/locale/nl_NL/FireGento_Pdf.csv index 68fa82f..63a0daf 100644 --- a/src/app/locale/nl_NL/FireGento_Pdf.csv +++ b/src/app/locale/nl_NL/FireGento_Pdf.csv @@ -1,88 +1,126 @@ -"Invoice maturity: %s days","Vervaldatum van de factuur: %s Tage" -"Invoice Maturity","Vervaldatum van de factuur" -"Days after the invoice is due. Leave this field blank to hide the message on the invoice.","Aantal dagen waarna de factuur is verlopen. Laat dit veld leeg om de melding te verbergen op de factuur." -"Invoice is payable immediately","De factuur is betaalbaar direct" -"Invoice date is equal to delivery date.","Factuurdatum is gelijk aan de verzending." -"Payment method:","Betaalmethode:" -"Shipping method:","Verzendmethode:" -"Payment method: %s","Betaalmethode: %s" -"Shipping method: %s","Verzendmethode: %s" -"Page","Pagina" -"Telephone:","Telefoon:" -"Fax:","Fax:" -"E-Mail:","E-mail:" -"Web:","Website:" -"Bank name:","Banknaam:" -"Account:","Rekening nr.:" -"Bank number:","Bank nummer:" "Account owner:","Ten name van:" -"SWIFT:","SWIFT:" -"IBAN:","IBAN:" -"Tax number:","BTW-Nummer:" -"VAT-ID:","BTW-nr.:" -"Register number:","HRB Nummer:" -"CEO:","Directeur:" -"Pos","Pos." -"No.","Artikelnummer" -"Description","Omschrijving" -"Price (excl. tax)","Prijs (Incl. BTW)" -"Amount","Bedrag" -"Tax","BTW" -"Total","Totaal" -"Invoice","Factuur" +"Account:","Rekeningnummer:" +"Add Note","Notitie toevoegen" +"Add notes based on the shipping country","Voeg notitie toe afhankelijk van het land van verzending" +"available placeholder: strftime() date formats like ""%Y""","Beschikbare placeholder: strftime() datumformaat, zoals bijvoorbeeld ""%Y""" +"available placeholders: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Beschikbare placeholders: {{creditmemo_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} en strftime() datumformaat, zoals bijvoorbeeld ""%Y""" +"available placeholders: {{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Beschikbare placeholders: {{invoice_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} en strftime() datumformaat, zoals bijvoorbeeld ""%Y""" +"available placeholders: {{shipment_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} and strftime() date formats like ""%Y""","Beschikbare placeholders: {{shipment_id}}, {{order_id}}, {{customer_id}}, {{customer_name}}, {{customer_firstname}}, {{customer_lastname}} en strftime() datumformaat, zoals bijvoorbeeld ""%Y""" +"Bank name:","Banknaam:" +"Bank number:","Banknummer:" +"Bold font","dikgedrukt" +"Caution: Your columns may overlap!","Waarschuwing: de kolommen kunnen overlappen!" +"Center","Midden" +"CEO:","Algemeen directeur:" "Creditmemo","Creditfactuur" -"Order number:","Bestelnr.:" -"Invoice number:","Factuurnr.:" -"Shipment number:","Verzendnr.:" -"Creditmemo number:","Creditfactuurnr.:" -"Customer number:","Klantnr.:" +"Creditmemo number:","Creditfactuurnummer:" "Customer IP:","Klant IP:" -"Invoice date:","Factuurdatum:" -"Shipping date:","Verzenddatum:" +"Customer number:","Klantnummer:" +"Customer number for guest orders","Klantnummer voor gastbestellingen" "Date:","Datum:" -"Additional tax %s","Extra BTW %s" -"Subtotal:","Subtotaal:" -"Shipping:","Verzending:" +"Days after the invoice is due. Leave this field blank to hide the message on the invoice.","Aantal dagen waarna de factuur is verlopen. Laat dit veld leeg om de melding te verbergen op de factuur." +"Define the order by moving the following items using your mouse:","Stel de volgorde in door de items met uw muis te verslepen:" +"Description","Omschrijving" +"DIN A4","DIN A4" +"Display Tax Total if display Summary is on","Toon BTW totaal indien het tonen van de samenvatting aan staat" +"E-Mail:","E-mail:" +"Fax:","Fax:" +"Filename Export Pattern","Exportpatroon bestandsnaam" +"Filename Export Pattern for Multiple Documents","Exportpatroon bestandsnaam voor meerdere documenten" +"Fonts for PDF Creation","Lettertypes voor PDF creatie" +"Full width","Volledige breedte" +"Full width means that the logo starts at the upper left corner and is drawn to the right edge. There is no left or right margin for printing.","Volledige breedte betekent dat het logo in de linkerbovenhoek begint en loopt tot de rechterkant. Er is geen linker- of rechtermarge bij het printen." +"Grand Total (Excl. Tax)","Eindtotaal (excl. BTW)" +"Grand Total (Incl. Tax)","Eindtotaal (incl. BTW)" "Grand Total:","Eindtotaal:" -"Guestorder","Gastbestelling" -"PDF Engine","PDF Engine" +"Guest orders don't have a customer no., this text is displayed instead. Leave blank to hide customer no. completely.","Gastbestellingen hebben geen klantnummer, deze tekst wordt in plaats hiervan getoond. Laat leeg om geen klantnummer te tonen." +"Header","Header" +"Header Blocks Position","Positie van adres- en informatie header blokken" +"Here you can add notes to the invoice based on the shipping country of the order.","Hier kunt u notities toevoegen aan de factuur afhankelijk van het land van verzending." +"Hide Grand Total excl. Tax if display Summary is on","Verberg eindtotaal indien het tonen van de samenvatting aan staat" +"Hide payment method","Verberg betaalmethode" +"Hide shipping method","Verberg verzendmethode" +"IBAN:","IBAN:" +"Invalid draw line data. Please define ""lines"" array","Ongeldige data om een rij te schrijven. Definieer aub een ""lines"" array." +"Invoice","Factuur" +"Invoice date is equal to delivery date.","Factuurdatum is gelijk aan de verzenddatum." +"Invoice date:","Factuurdatum:" +"Invoice is payable immediately","De factuur is direct betaalbaar" +"Invoice Maturity","Vervaldatum van de factuur" +"Invoice maturity: %s days","Vervaldatum van de factuur: %s dagen" +"Invoice number:","Factuurnummer:" +"Italic font","schuingedrukt" +"Left","Links" +"Left: Customer address left, Invoice details right. Right: Invoice details left, Customer address right.","Links: klantadres links, factuurdetails rechts. Rechts: factuurdetails links, klantadres rechts" +"Logo Position","Logo Positie" +"N/A","Niet beschikbaar" +"No.","Artikelnummer" +"not to be listed","zal niet getoond worden" "Note","Notitie" +"Notes area","Notitievak" +"Order number:","Bestelnummer:" +"Order of price columns of items","Volgorde prijskolommen van de items" +"Packingslip","Pakbon" +"Page","Pagina" +"Page Size","Paginagrootte" +"Payment method:","Betaalmethode:" +"Payment method: %s","Betaalmethode: %s" +"PDF Creation","PDF's aanmaken" +"PDF Engine","PDF engine" +"Pos","Pos." +"Position of payment method on invoice.","Positie van de betaalmethode op de factuur." +"Position of shipping method on invoice.","Positie van de verzendmethode op de factuur." +"Position of shipping method on shipment.","Positie van de verzendmethod op de verzending." +"Price","Prijs" +"Price (excl. tax)","Prijs (excl. BTW)" +"Price (incl. tax)","Prijs (incl. BTW)" +"Printed on every credit memo.","Wordt op elke creditfactuur afgedrukt." "Printed on every invoice.","Wordt op elke factuur afgedrukt." "Printed on every shipment.","Wordt op elke verzending afgedrukt." -"Printed on every credit memo.","Wordt op elke creditfactuur afgedrukt." -"PDF Creation","PDF's Aanmaken" +"Prints the order ID as a barcode on the right hand side.","Print het bestelnummer als een barcode aan de rechterkant." +"Qty","Aantal" +"Register court:","Kamer van Koophandel:" +"Register number:","KvK-nummer:" +"Registered seat:","Zetel:" +"Regular font","standaard lettertype" +"Resize or not the size of your logo in the header. Value possible from 1 (minimum size) to 100 (full size). Values in percent.","Verklein het logo in de header. Mogelijke waardes (in percentages): van 1 (minimum) to 100 (volledige breedte)." +"Right","Rechts" "Sender Address Bar","Afzenderadres" +"Shipment","Verzending" +"Shipment number:","Verzendnummer:" +"Shipping Country","Land van verzending" +"Shipping date:","Verzenddatum:" +"Shipping method:","Verzendmethode:" +"Shipping method: %s","Verzendmethode: %s" +"Show address above shipping/invoice address","Toon adres boven verzend/factuuradres" +"Show Credit Memo Comments","Toon notities voor creditfactuur" +"Show Customer Number","Toon klantnummer" +"Show Customer TAX/VAT Number","Toon klant BTW nummer" +"Show Date Notice","Toon opmerking omtrent datum" "Show Footer","Toon Footer" -"Logo Position","Logo Positie" -"Left","Links" -"Center","Midden" -"Right","Reechts" -"Standard Magento","Standaard Magento" -"Standard Germany","Standaard Duitsland" +"Show Imprint. Compatible with MageSetup or GermanSetup (not anymore maintained, replaced by MageSetup)","Toon afdruk, compatibel met MageSetup of GermanSetup (wordt niet meer doorontwikkeld en wordt vervangen door MageSetup)" +"Show Invoice Comments","Toon notities voor factuur" +"Show Item Discount","Toon korting van item" +"Show Notice: Invoice date is equal to delivery date.","Toon opmerking: Factuurdatum is gelijk aan de verzenddatum." +"Show Order ID as Barcode","Toon bestelnummer als barcode" "Show Payment Method","Toon betaalmethode" -"Hide payment method","Verberg betaalmethode" -"Header","Document-header" -"Notes area","Notitie-ruimte" -"Position of payment method on invoice.","Positie van de betaalmethode op de factuur" +"Show Shipment Comments","Toon notities voor levering" "Show Shipping Method","Toon verzendmethode" -"Hide shipping method","Verberg verzendmethode" -"Position of shipping method on invoice.","Positie van de verzendmethode op de factuur" -"Position of shipping method on shipment.","Position of shipping method on shipment." -"not to be listed","niet getoond" -"Show Invoice Comments","Toon factuurnotities" -"Show Item Discount","Toon korting van item" -"You get a discount of %s.","U krijg een korting van %s." -"Tax amount",BTW-bedrag -"Price (incl. tax)","Prijs (Excl. BTW)" -"Subtotal (incl. tax)","Subtotaal (Excl. BTW)" -"Order of price columns of items","Volgorde van de prijs-kolommen van items" -"Define the order by moving the following items using your mouse:","Stel de volgorde in door deze met uw muis te verslepen" +"Standard FireGento","Standaard FireGento" +"Standard Magento","Standaard Magento" +"Subtotal (incl. tax)","Subtotaal (incl. BTW)" +"Subtotal:","Subtotaal:" +"SWIFT:","SWIFT:" +"Tax","BTW" +"Tax amount","BTW-bedrag" +"Tax number:","BTW-nummer:" "Tax rate",BTW-bedrag -"Total (incl. tax)","Totaal (Excl. BTW)" -"Show Date Notice","Toon datumopmerking" -"Show Notice: Invoice date is equal to delivery date.","Toon opmerking: Factuurdatum is gelijk aan de verzending." -"Show Customer Number","Toon klantnummer" -"Full width","Volledige breedte" -"Full width means that the logo starts at the upper left corner and is drawn to the right edge. There is no left or right margin for printing.","Volledige breedte betekent dat het logo in de linker bovenhoek begint t/m de rechter bovenhoek. Er is geen linker of rechter marge bij het printen." -"Show Order ID as Barcode","Toon Bestelling nr. als Barcode" -"Prints the order ID as a barcode on the right hand side.","Print het bestel nr. als een barcode aan de rechterkant." +"Telephone:","Telefoon:" +"There are no printable documents related to selected orders","Er zijn geen documenten die kunnen worden afgedrukt voor de geselecteerde orders." +"Total","Totaal" +"Total (incl. tax)","Totaal (incl. BTW)" +"Upload own fonts","Upload eigen lettertypes" +"VAT-ID:","BTW-nummer:" +"Web:","Website:" +"You can upload your own fonts (*.ttf) instead of using Zends Helvetica","U kunt uw eigen lettertypes (*.ttf) uploaden in plaats van Helvetica." +"You get a discount of %s.","Korting: %s"