first commit
This commit is contained in:
30
admin/printCenterPDF.php
Normal file
30
admin/printCenterPDF.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
// ##############################################################
|
||||
use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
|
||||
|
||||
$main_class = 'printCenterPDF';
|
||||
|
||||
class printCenterPDF
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$id = getVal('ID');
|
||||
$set = getVal('set');
|
||||
$IDs = getVal('orders');
|
||||
|
||||
$pdf = ServiceContainer::getService(\KupShop\OrderingBundle\Util\Invoice\PdfGenerator::class);
|
||||
$pdf->setPdfTimeout(120);
|
||||
if (!empty($id) && $set == 'invoice') {
|
||||
return $pdf->printInvoicePDFContent($id);
|
||||
} elseif (!empty($IDs) && is_array($IDs) && $set == 'multiplePDF') {
|
||||
return $pdf->printMultipleInvoicePDFContent($IDs);
|
||||
}
|
||||
|
||||
if (!empty($_SERVER['HTTP_REFERER'])) {
|
||||
redirect($_SERVER['HTTP_REFERER']);
|
||||
}
|
||||
|
||||
redirect('/admin/');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user