$typ =
$this->
Request()->typ;
$voucher =
$this->
Request()->voucher;
$date =
$this->
Request()->date;
$delivery_date =
$this->
Request()->delivery_date;
$bid =
$this->
Request()->bid;
$renderer =
strtolower($this->
Request()->
getParam('renderer', 'pdf'
)); // html / pdf
if (!\
in_array($renderer,
['html', 'pdf'
])) { $renderer = 'pdf';
} $this->
View()->
setTemplate();
$document = Shopware_Components_Document::
initDocument( $id,
$typ,
[ 'netto' =>
$netto,
'bid' =>
$bid,
'voucher' =>
$voucher,
'date' =>
$date,
'delivery_date' =>
$delivery_date,
'shippingCostsAsPosition' => true,
'_renderer' =>
$renderer,
'_preview' =>
$this->
Request()->preview,