Permalink
Browse files

Fixed back-office PDF names when downloaded.

  • Loading branch information...
roadster31 committed Nov 21, 2017
1 parent 1c8d93d commit 3fef289f0fbee4a6ce141bb5a9d582c8643f2497
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/lib/Thelia/Controller/Admin/OrderController.php
@@ -215,20 +215,20 @@ public function generateInvoicePdf($order_id, $browser)
if (null !== $response = $this->checkAuth(AdminResources::ORDER, array(), AccessManager::UPDATE)) {
return $response;
}
return $this->generateBackOfficeOrderPdf($order_id, ConfigQuery::read('pdf_invoice_file', 'invoice'), $browser);
return $this->generateBackOfficeOrderPdf($order_id, ConfigQuery::read('pdf_invoice_file', 'invoice'), $browser == 0);
}
public function generateDeliveryPdf($order_id, $browser)
{
if (null !== $response = $this->checkAuth(AdminResources::ORDER, array(), AccessManager::UPDATE)) {
return $response;
}
return $this->generateBackOfficeOrderPdf($order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'), $browser);
return $this->generateBackOfficeOrderPdf($order_id, ConfigQuery::read('pdf_delivery_file', 'delivery'), $browser == 0);
}
private function generateBackOfficeOrderPdf($order_id, $fileName, $browser)
{
if (null === $response = $this->generateOrderPdf($order_id, $fileName, true, true, $browser)) {
if (null === $response = $this->generateOrderPdf($order_id, $fileName, true, true, $browser == 0)) {
return $this->generateRedirectFromRoute(
"admin.order.update.view",
[],

0 comments on commit 3fef289

Please sign in to comment.