OrderDocumentCreationService

Implements \Shopware\Plugins\ViisonPickwareERP\Components\Document\OrderDocumentCreation, \Enlight_Hook

package

Default

Methods

__construct

__construct(\Shopware\Components\Model\ModelManager $entityManager, \Enlight_Event_EventManager $eventManager, \Shopware\Plugins\ViisonCommon\Components\DocumentComponentListenerService $documentComponentListenerService) 

Arguments

$entityManager

\Shopware\Components\Model\ModelManager

$eventManager

\Enlight_Event_EventManager

$documentComponentListenerService

\Shopware\Plugins\ViisonCommon\Components\DocumentComponentListenerService

Creates and returns a new cancellation document of given `$documentType` for the given `$order`. The created document will only contain the positions contained in `$positions`.

createOrderCancellationDocument(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $positions, string $invoiceNumber, string $comment, string|null $dateString, boolean $cancelShippingCost) : \Shopware\Models\Order\Document\Document

This method supports creating multiple documents of the same type for a single order.

inheritdoc

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$positions

array

$invoiceNumber

string

$comment

string

$dateString

string|null

A formatted date string for the invoice. If null, date of today is used.

$cancelShippingCost

boolean

Response

\Shopware\Models\Order\Document\Document

Creates and returns a new document of given `$documentType` for the given `$order`.

createOrderDocument(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $documentConfig = array()) : \Shopware\Models\Order\Document\Document
inheritdoc

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$documentConfig

array

Response

\Shopware\Models\Order\Document\Document

Outputs a preview of a cancellation document to the client.

showOrderCancellationDocumentPreview(\Shopware\Models\Order\Order $order, \Shopware\Models\Document\Document $documentType, array $positions, string $invoiceNumber, string $comment, string|null $dateString, boolean $cancelShippingCost) 

Script execution is ended after output.

inheritdoc

Arguments

$order

\Shopware\Models\Order\Order

$documentType

\Shopware\Models\Document\Document

$positions

array

$invoiceNumber

string

$comment

string

$dateString

string|null

A formatted date string for the invoice. If null, date of today is used.

$cancelShippingCost

boolean

Constants

CONFIG

CONFIG